Showing 994 of 1,238 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
LanguageNameUtils $languageNameUtils,
TranslationStashReader $stash,
UserOptionsLookup $userOptionsLookup,
LanguageFactory $languageFactory,
ServiceOptions $options
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ApiMain $mainModule,
string $moduleName,
IConnectionProvider $dbProvider,
UserFactory $userFactory,
MessageIndex $messageIndex
Method validateMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
IContextSource $context,
Content $content,
Status $status,
string $summary,
User $user
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
LinkRenderer $linkRenderer,
ConfigHelper $configHelper,
MessageLocalizer $messageLocalizer,
Language $language,
MessageGroupMetadata $messageGroupMetadata
Method checkNonSourceAdditionsForRename
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
MessageSourceChange $changes,
string $sourceLanguage,
string $targetLanguage,
MessageCollection $wiki,
array $wikiKeys
Method searchProfileForm
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SpecialSearch $search,
string &$form,
string $profile,
string $term,
array $opts
Method getGroupSyncInfoHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $className,
string $summaryMsgKey,
string $descriptionMsgKey,
string $htmlContent,
string $preHtmlContent = null
Method backport
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
FileBasedMessageGroup $group,
string $source,
string $targetPath,
array $keyCompatibilityMap,
string $language
Method addMessageUpdateChanges
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
FileBasedMessageGroup $group,
string $language,
MessageSourceChange $changes,
int $reason,
MessageGroupCache $cache
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
?string $sourceLanguageCode,
?array $priorityLanguageCodes,
bool $allowOnlyPriorityLanguages,
?string $description,
?string $label
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
RevTagStore $revTagStore,
JobQueueGroup $jobQueue,
LanguageNameUtils $languageNameUtils,
MessageIndex $messageIndex,
MessageGroupMetadata $messageGroupMetadata
Method onAfterImportPage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onAfterImportPage( $title, $foreignTitle, $revCount, $sRevCount, $pageInfo ) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ApiQuery $query,
string $moduleName,
HookRunner $hookRunner,
MessageGroupMetadata $messageGroupMetadata,
MessageGroupSubscription $groupSubscription
Method handleRename
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
MessageGroup $group,
MessageSourceChange $sourceChanges,
string $msgKey,
string $keyToRename,
string $sourceLanguage
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
WikiImporterFactory $wikiImporterFactory,
TranslatablePageParser $translatablePageParser,
RevisionLookup $revisionLookup,
NamespaceInfo $namespaceInfo,
TitleFactory $titleFactory
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ApiMain $main,
string $action,
JobQueueGroup $jobQueueGroup,
MessageGroupMetadata $messageGroupMetadata,
AggregateGroupManager $aggregateGroupManager
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
MessageGroupSubscriptionStore $groupSubscriptionStore,
JobQueueGroup $jobQueueGroup,
UserIdentityLookup $userIdentityLookup,
LoggerInterface $logger,
ServiceOptions $options
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ProgressStatsTableFactory $progressStatsTableFactory,
LinkRenderer $linkRenderer,
MessageGroupReviewStore $groupReviewStore,
MessageGroupMetadata $messageGroupMetadata,
bool $haveTranslateWorkflowStates
Method shouldIgnore
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $messageKey,
ValidationIssue $issue,
string $messageGroupId,
string $targetLanguage,
array $pattern
Function execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function execute() {
$spec = $this->getArg( 0 );
$patterns = explode( ',', trim( $spec ) );
$ids = MessageGroups::expandWildcards( $patterns );
- 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"