Showing 994 of 1,238 total issues
Function hasOnly
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function hasOnly( $language, $type ) {
$deletions = $this->getDeletions( $language );
$additions = $this->getAdditions( $language );
$renames = $this->getRenames( $language );
$changes = $this->getChanges( $language );
- 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 levenshtein
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function levenshtein( string $str1, string $str2, int $length1, int $length2 ): int {
if ( $length1 === 0 ) {
return $length2;
}
- 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 handleNew
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function handleNew(
MessageSourceChange $sourceChanges,
string $msgKey,
string $sourceLang
): void {
- 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 calculateAggregateGroup
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function calculateAggregateGroup(
array &$stats,
AggregateMessageGroup $group,
string $code,
int $flags
- 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 get
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function get(
array $stats,
MessageGroup $group,
bool $noComplete,
bool $noEmpty
- 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 pluralFormCheck
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function pluralFormCheck( string $text, ?array $expectedKeywords ): array {
[ , $instanceMap ] = UnicodePlural::parsePluralForms( $text );
foreach ( $instanceMap as $forms ) {
$actualKeywords = [];
- 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 parseTags
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function parseTags( $patterns ) {
$messageKeys = $this->getKeys();
$matches = [];
- 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 execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function execute( $parameters ): void {
$this->setHeaders();
$this->addHelpLink( 'Help:Extension:Translate/Page translation administration' );
$out = $this->getOutput();
- 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 getMessage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getMessage( $key, $code ) {
$cache = $this->getMessageGroupCache( $code );
if ( $cache->exists() ) {
$msg = $cache->get( $key );
- 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 7 arguments (exceeds 4 allowed). Consider refactoring. Open
array $priorityLanguages,
bool $forcePriorityLanguages,
string $priorityReason,
array $noFuzzyUnits,
bool $translateTitle,
Method updateTranslationPage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
TranslatablePage $page,
string $code,
User $user,
int $flags,
string $summary,
Method moveAsynchronously
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $source,
Title $target,
bool $moveSubPages,
User $user,
string $moveReason,
Method moveSynchronously
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $source,
Title $target,
array $pagesToMove,
array $pagesToRedirect,
User $performer,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
ParserOutput $output,
WikiPageMessageGroup $group,
Language $targetLanguage,
Language $sourceLanguage,
bool $showOutdated,
Method onMovePageTranslationUnits
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
LinkTarget $oldLinkTarget,
LinkTarget $newLinkTarget,
UserIdentity $userIdentity,
int $oldid,
int $newid,
Method getPageMoveCollection
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $source,
?Title $target,
User $user,
string $reason,
bool $moveSubPages,
Method onSectionSave
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
WikiPage $wikiPage,
User $user,
TextContent $content,
$summary,
$minor,
Method onChangesListSpecialPageQuery
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$name, &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts
Method isRenameMissing
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
WebRequest $req,
MessageSourceChange $sourceChanges,
string $id,
string $key,
string $language,
Method handleRenameSubmit
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
MessageGroup $group,
MessageSourceChange $sourceChanges,
WebRequest $req,
string $language,
array &$postponed,