Showing 2,096 of 2,096 total issues
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
SiteLinkLookup $siteLinkLookup,
EntityLookup $entityLookup,
UsageAccumulator $usageAccumulator,
HookContainer $hookContainer,
LoggerInterface $logger,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Language $language,
PropertyIdResolver $propertyIdResolver,
SnaksFinder $snaksFinder,
SnakFormatter $snakFormatter,
EntityLookup $entityLookup,
Method onEnhancedChangesListModifyLineData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$changesList,
&$data,
$block,
$rc,
&$classes = [],
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
StatsdDataFactoryInterface $statsdDataFactory,
$siteId,
$siteGroup,
$trackLuaFunctionCallsPerSiteGroup,
$trackLuaFunctionCallsPerWiki,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
StatementTransclusionInteractor $plainTextTransclusionInteractor,
StatementTransclusionInteractor $richWikitextTransclusionInteractor,
EntityIdParser $entityIdParser,
ContentLanguages $termsLanguages,
UsageAccumulator $usageAccumulator,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
StatementGroupRendererFactory $rendererFactory,
SiteLinkLookup $siteLinkLookup,
EntityIdParser $entityIdParser,
RestrictedEntityLookup $restrictedEntityLookup,
$siteId,
Method formatDataForEnhancedLine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
array &$data,
ExternalChange $externalChange,
Title $title,
int $count,
Language $lang,
Method attemptSave
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $title,
EntityContent $content,
string $summary,
int $undidRevId,
int $originalRevId,
Function getRevisionHeader
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getRevisionHeader( RevisionRecord $rev, $complete = '' ) {
//NOTE: This must be kept in sync with the parent implementation.
// Perhaps some parts could be factored out to reduce code duplication.
$lang = $this->getLanguage();
- 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 saveEntityContent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityContent $entityContent,
User $user,
$summary = '',
$flags = 0,
$baseRevId = false,
Function filterRequest
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function filterRequest( array $jsonResult, int $limit ) {
$resultsArray = [];
$filteredResultCount = 0;
foreach ( $jsonResult['search'] as $result ) {
- 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
OtherProjectsSidebarGeneratorFactory $otherProjectsSidebarGeneratorFactory,
SiteLinkLookup $siteLinkLookup,
EntityLookup $entityLookup,
UsageAccumulatorFactory $usageAccumulatorFactory,
string $siteId,
Method getRankedSearchResults
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$text,
$languageCode,
$entityType,
$limit,
$strictLanguage,
Method onSearchDataForIndex2
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
array &$fields,
ContentHandler $handler,
WikiPage $page,
ParserOutput $output,
SearchEngine $engine,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
LanguageLinkBadgeDisplay $badgeDisplay,
NamespaceChecker $namespaceChecker,
SiteLinksForDisplayLookup $siteLinkForDisplayLookup,
SiteLookup $siteLookup,
string $siteId,
Method getRankedSearchResults
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$text,
$languageCode,
$entityType,
$limit,
$strictLanguage,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityNamespaceLookup $entityNamespaceLookup,
EntityIdLookup $entityIdLookup,
RepoDomainDb $repoDomainDb,
array $entityTypes = [],
$redirectMode = EntityIdPager::NO_REDIRECTS,
Function rebuildPropertyInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function rebuildPropertyInfo(): int {
$propertyNamespace = $this->entityNamespaceLookup->getEntityNamespace(
Property::ENTITY_TYPE
);
if ( $propertyNamespace === 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
Function generateNewId
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function generateNewId( IDatabase $database, $type, $retry = true ) {
$database->startAtomic( __METHOD__ );
$currentId = $database->newSelectQueryBuilder()
->select( 'id_value' )
- 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
HttpRequestFactory $httpRequestFactory,
array $contentModelMappings,
DataTypeDefinitions $dataTypeDefinitions,
EntitySourceDefinitions $entitySourceDefinitions,
string $federatedPropertiesSourceScriptUrl,