Showing 2,096 of 2,096 total issues
Method saveRedirect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityRedirect $redirect,
$summary,
User $user,
$flags = 0,
$baseRevId = false,
Method saveEntity
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityDocument $entity,
$summary,
User $user,
$flags = 0,
$baseRevId = false,
Method factory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
DescriptionLookup $descriptionLookup,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
NamespaceChecker $namespaceChecker,
RepoLinker $repoLinker,
SettingsArray $clientSettings,
Method addEntityRevision
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$sourceEntityIdSerialization,
EntityRevision $entityRevision,
$props = 'all',
array $filterSiteIds = null,
array $filterLangCodes = [],
Function validateParameters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function validateParameters( array $params ): void {
if ( !( $this->modificationHelper->validateStatementGuid( $params['claim'] ) ) ) {
$this->errorReporter->dieError( 'Invalid claim guid', 'invalid-guid' );
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getRankedSearchResults
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$text,
$languageCode,
$entityType,
$limit,
$strictLanguage,
Method getRankedSearchResults
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$text,
$languageCode,
$entityType,
$limit,
$strictLanguage,
Method factory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
DataTypeFactory $dataTypeFactory,
EntityIdFormatterFactory $entityIdFormatterFactory,
EntityTitleLookup $entityTitleLookup,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
PropertyInfoLookup $propertyInfoLookup,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ApiQuery $query,
string $moduleName,
AliasTermBuffer $aliasTermBuffer,
EntityIdLookup $idLookup,
TermBuffer $termBuffer,
Method factory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
SiteLookup $siteLookup,
EntityTitleLookup $entityTitleLookup,
LanguageNameLookupFactory $languageNameLookupFactory,
LoggerInterface $logger,
SettingsArray $repoSettings,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RevisionLookup $revisionLookup,
TitleFactory $titleFactory,
EntityIdParser $idParser,
EntityRevisionLookup $entityRevisionLookup,
EntityTitleStoreLookup $entityTitleStoreLookup,
Function getParser
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getParser(): ValueParser {
$params = $this->extractRequestParams();
$options = $this->getOptionsObject( $params['options'] );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method factory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ApiMain $mainModule,
string $moduleName,
IBufferingStatsdDataFactory $stats,
ChangeOpFactoryProvider $changeOpFactoryProvider,
EntityFactory $entityFactory,
Method attemptSaveMerge
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Item $fromItem,
Item $toItem,
?string $summary,
IContextSource $context,
bool $bot,
Function parseBadges
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function parseBadges( array $badges, Status $status ) {
$badgesObjects = [];
foreach ( $badges as $badge ) {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ApiMain $mainModule,
string $moduleName,
FingerprintChangeOpFactory $termChangeOpFactory,
bool $federatedPropertiesEnabled,
EntityFactory $entityFactory,
Function getFormFields
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getFormFields(): array {
$formFields = [
self::FIELD_LANG => [
'name' => self::FIELD_LANG,
'class' => HTMLContentLanguageField::class,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadEntityRevision
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function loadEntityRevision(
EntityId $entityId,
$revId = 0,
$mode = null
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ApiMain $mainModule,
string $moduleName,
FingerprintChangeOpFactory $termChangeOpFactory,
bool $federatedPropertiesEnabled,
EntityFactory $entityFactory,
Method initRepoJobServices
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityLookup $entityLookup,
EntityStore $entityStore,
SummaryFormatter $summaryFormatter,
LoggerInterface $logger,
MediaWikiEditEntityFactory $editEntityFactory,