Showing 1,432 of 2,096 total issues
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $itemId,
string $languageCode,
array $editTags,
bool $isBot,
?string $comment,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $propertyId,
string $statementId,
array $editTags,
bool $isBot,
?string $comment,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $statementId,
array $patch,
array $editTags,
bool $isBot,
?string $comment,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $itemId,
string $siteId,
array $editTags,
bool $isBot,
?string $comment,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
AddPropertyStatementValidator $validator,
AssertPropertyExists $assertPropertyExists,
PropertyWriteModelRetriever $propertyRetriever,
GuidGenerator $guidGenerator,
PropertyUpdater $propertyUpdater,
Method saveEntity
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityDocument $entity,
$summary,
User $user,
$flags = 0,
$baseRevId = false,
Method saveEntity
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function saveEntity( EntityDocument $entity, $summary, User $user, $flags = 0, $baseRevId = false, array $tags = [] );
Function insertNonExistingRecords
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function insertNonExistingRecords(
array $records,
?callable $recordsToInsertDecoratorCallback = null
): array {
if ( !$records ) {
- 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 addLanguageAndVariantsToChain
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function addLanguageAndVariantsToChain( $language, array &$chain, array &$fetched ): void {
$languageCode = is_string( $language ) ? $language : $language->getCode();
$this->addLanguageToChain( $language, $chain, $fetched );
- 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
LabelDescriptionLookup $labelDescriptionLookup,
LanguageNameLookup $languageNameLookup,
EntityExistenceChecker $entityExistenceChecker,
EntityTitleTextLookup $entityTitleTextLookup,
EntityUrlLookup $entityUrlLookup,
Function resolveGroupedTermInLangIds
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function resolveGroupedTermInLangIds(
array $groupedTermInLangIds,
array $types = null,
array $languages = null
): array {
- 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 resolveTermsViaJoin
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$joinTable,
$joinColumn,
$groupColumn,
array $conditions,
array $types = null,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TemplateFactory $templateFactory,
LanguageNameLookup $languageNameLookup,
LocalizedTextProvider $textProvider,
LanguageDirectionalityLookup $languageDirectionalityLookup,
LanguageFallbackChainFactory $languageFallbackChainFactory,
Method mergeComplexArrays
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $key,
array $value,
array $defaultValue,
array $twoDArrayMerge,
array $overrideArrays,
Function loadEntityDataFromWikiPageRevision
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function loadEntityDataFromWikiPageRevision( RevisionRecord $revision, string $slotRole, int $revStoreFlags ) {
// NOTE: Support for cross-wiki content access in RevisionStore is incomplete when,
// reading from the pre-MCR database schema, see T201194.
// For that reason, we have to load and decode the content blob directly,
// instead of using RevisionRecord::getContent() or SlotRecord::getContent().
- 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 saveRedirect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityRedirect $redirect,
$summary,
User $user,
$flags = 0,
$baseRevId = false,
Method saveRedirect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function saveRedirect( EntityRedirect $redirect, $summary, User $user, $flags = 0, $baseRevId = false, array $tags = [] );
Function criteriaToQueryResults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function criteriaToQueryResults(
IReadableDatabase $dbr,
array $criteria,
$termType = null,
$entityType = 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
Term $matchedTerm,
string $matchedTermType,
?EntityId $entityId,
Term $displayLabel = null,
Term $displayDescription = null,
Function formatReferenceLink
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function formatReferenceLink( array $referenceUrlSnaks, array $titleSnaks ): ?string {
if ( count( $referenceUrlSnaks ) === 1 && count( $titleSnaks ) === 1 ) {
$referenceUrlSnak = $referenceUrlSnaks[0];
$titleSnak = $titleSnaks[0];
if ( $referenceUrlSnak instanceof PropertyValueSnak && $titleSnak instanceof PropertyValueSnak ) {
- 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"