Showing 1,432 of 2,096 total issues
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,
Function validateParameters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function validateParameters( array $params ): void {
$entityReferenceBySiteLinkGiven = isset( $params['site'] ) && isset( $params['title'] );
$entityReferenceBySiteLinkPartial = ( isset( $params['site'] ) xor isset( $params['title'] ) );
$entityIdGiven = isset( $params['id'] );
$shouldCreateNewWithSomeType = isset( $params['new'] );
- 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 onArticleDeleteComplete
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
WikiPage $wikiPage,
User $user,
$reason,
$id,
?Content $content,
Method onFormat
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function onFormat( &$comment, $pre, $auto, $post, $title, $local ) {
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,