Showing 994 of 1,238 total issues
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $groupId,
string $name,
int $pageId,
int $revisionId,
?string $description,
Function execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->checkUserRightsAny( self::RIGHT );
$block = $this->getUser()->getBlock();
if ( $block && $block->isSitewide() ) {
$this->dieBlocked( $block );
- 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 syncStatus
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function syncStatus( array $bundlesWithDifference, string $differenceType ): void {
if ( !$bundlesWithDifference ) {
$this->output( "No \"$differenceType\" bundle statuses\n" );
return;
}
- 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 import
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $importFilePath,
string $interwikiPrefix,
bool $assignKnownUsers,
UserIdentity $user,
?Title $targetPage,
Function breakRename
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function breakRename( $languageCode, $msgKey ) {
$msg = $this->findMessage( $languageCode, $msgKey, [ self::RENAME ] );
if ( $msg === null ) {
return 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 run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function run() {
$title = $this->title;
$fuzzyBot = FuzzyBot::getUser();
$summary = $this->getSummary();
$base = $this->getBase();
- 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 newJob
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $target,
string $base,
string $bundleType,
bool $isTranslationPage,
UserIdentity $performer,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
LinkBatchFactory $linkBatchFactory,
ProgressStatsTableFactory $progressStatsTableFactory,
LanguageNameUtils $languageNameUtils,
JobQueueGroup $jobQueueGroup,
MessageGroupReviewStore $groupReviewStore,
Function execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$user = $this->getUser();
$requestParams = $this->extractRequestParams();
$group = MessageGroups::getGroup( $requestParams['group'] );
- 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 indexOf
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function indexOf( stdClass $row ): ?array {
if ( $this->opts->getValue( 'count' ) === 'users' ) {
$date = $this->formatTimestamp( $row->rc_timestamp );
if ( isset( $this->seenUsers[$date][$row->rc_actor] ) ) {
- 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 identifyDifferences
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function identifyDifferences(
array $translatableBundles,
array $translatableBundleStatuses
): array {
$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
Function filterPriorityLangs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function filterPriorityLangs( array &$languages, string $group, array $cache ): void {
$filterLangs = $this->messageGroupMetadata->get( $group, 'prioritylangs' );
if ( $filterLangs === false || strlen( $filterLangs ) === 0 ) {
// No restrictions, keep everything
return;
- 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 newJob
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Title $source,
Title $target,
array $moves,
array $redirects,
string $reason,
Function writeReal
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function writeReal( MessageCollection $collection ): string {
$output = '';
$mangler = $this->group->getMangler();
/** @var Message $m */
- 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 formatMessageBlock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $key,
Message $message,
array $trans,
array $pot,
int $pluralCount,
Method runValidation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
array $validatorData,
Message $message,
string $targetLanguage,
ValidationIssues $errors,
ValidationIssues $warnings,
Function pluralPresenceCheck
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function pluralPresenceCheck(
$definitionHasPlural,
$translationHasPlural,
$expectedPluralCount
) {
- 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 writeReal
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function writeReal( MessageCollection $collection ): string {
$output = $this->doHeader( $collection );
$output .= $this->doAuthors( $collection );
$mangler = $this->group->getMangler();
- 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
Consider simplifying this complex logical expression. Open
if (
e.type === 'keydown' &&
e.altKey === true &&
e.ctrlKey === false &&
e.shiftKey === false &&
Consider simplifying this complex logical expression. Open
if (helpers$1.isObject(value)) {
t = +value.top || 0;
r = +value.right || 0;
b = +value.bottom || 0;
l = +value.left || 0;