repo/includes/Api/SetReference.php
File SetReference.php
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare( strict_types = 1 );
namespace Wikibase\Repo\Api;
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ApiMain $mainModule,
string $moduleName,
DeserializerFactory $deserializerFactory,
ApiErrorReporter $errorReporter,
StatementChangeOpFactory $statementChangeOpFactory,
Method getAllowedParams
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return array_merge(
[
'statement' => [
ParamValidator::PARAM_TYPE => 'string',
Method factory
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
DeserializerFactory $deserializerFactory,
ChangeOpFactoryProvider $changeOpFactoryProvider,
Method execute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute(): void {
$params = $this->extractRequestParams();
$this->validateParameters( $params );
$entityId = $this->guidParser->parse( $params['statement'] )->getEntityId();
Method applyChangeOpAndReturnChangedReference
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ChangeOp $changeOp,
EntityDocument $entity,
Summary $summary,
Statement $statement,
Reference $newReference