Showing 994 of 1,238 total issues
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
WANObjectCache $cache,
Collation $collation,
MessageGroups $messageGroupFactory,
NamespaceInfo $namespaceInfo,
MessageIndex $messageIndex,
Method onChangesListSpecialPageQuery
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$pageName,
&$tables,
&$fields,
&$conds,
&$query_options,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Config $config,
JobQueueGroup $jobQueueGroup,
MessageGroupStatsTableFactory $messageGroupStatsTableFactory,
EntitySearch $entitySearch,
MessagePrefixStats $messagePrefixStats,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
GroupSynchronizationCache $groupSynchronizationCache,
JobQueueGroup $jobQueueGroup,
LoggerInterface $logger,
MessageIndex $messageIndex,
TitleFactory $titleFactory,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
StatsTable $table,
LinkRenderer $linkRenderer,
MessageLocalizer $localizer,
Language $interfaceLanguage,
MessageGroupReviewStore $groupReviewStore,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
MessageIndex $messageIndex,
JobQueueGroup $jobQueue,
RevTagStore $revTagStore,
IConnectionProvider $dbProvider,
TranslatableBundleStatusStore $translatableBundleStatusStore,
Method makeRow
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
StatsTable $table,
string $languageCode,
array $stats,
MessageGroup $group,
int $rowCount,
Avoid deeply nested control flow statements. Open
if ( i !== 0 ) {
translationUnits[ i - 1 ] += '\n' + mergeText;
} else {
matchText = mergeText + matchText;
}
Function roundedRect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
roundedRect: function(ctx, x, y, width, height, radius) {
Function drawPoint
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
drawPoint: function(ctx, style, radius, x, y, rotation) {
Avoid deeply nested control flow statements. Open
while ( emptyCount !== 0 ) {
mergeText += translationUnits.splice( i, 1 ).toString() + '\n';
emptyCount += 1;
}
Function doFill
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function doFill(ctx, points, mapper, view, color, loop) {
Function getScrollInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function getScrollInfo( within ) {
var overflowX = within.isWindow || within.isDocument ? '' :
within.element.css( 'overflow-x' ),
overflowY = within.isWindow || within.isDocument ? '' :
within.element.css( 'overflow-y' ),
- 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
Avoid deeply nested control flow statements. Open
for (var i = 0; i < rgb.length; i++) {
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
}
Function parseGroupFile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function parseGroupFile( $filename ) {
$data = file_get_contents( $filename );
$documents = preg_split( "/^---$/m", $data, -1, PREG_SPLIT_NO_EMPTY );
$groups = [];
$template = false;
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->bundleMover = Services::getInstance()->getTranslatableBundleMover();
$mwService = MediaWikiServices::getInstance();
$this->titleParser = $mwService->getTitleParser();
- 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
Avoid deeply nested control flow statements. Open
if (c1.valid) {
view[key] = c1.mix(c0, ease).rgbString();
continue;
}
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
PageMoveOperation $translatablePage,
array $translationPagePairs,
array $unitPagesPairs,
array $subpagesPairs,
array $nonMovableSubpages,
Avoid deeply nested control flow statements. Open
if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
continue;
}
Avoid deeply nested control flow statements. Open
else if (match = string.match(keyword)) {
if (match[1] == "transparent") {
return [0, 0, 0, 0];
}
rgb = colorName$1[match[1]];