Showing 11,545 of 11,545 total issues
Function load
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function load( $flags = IDBAccessObject::READ_NORMAL ) {
global $wgFullyInitialised;
if ( $this->mLoadedItems === true ) {
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
Function clearInstanceCache
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function clearInstanceCache( $reloadFrom = false ) {
global $wgFullyInitialised;
$this->mDatePreference = null;
$this->mHash = 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 limitTitle
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function limitTitle( $page, $pattern ) {
if ( !$page instanceof PageReference ) {
// NOTE: For some types of logs, the title may be something strange, like "User:#12345"!
$page = Title::newFromText( $page );
if ( !$page ) {
- 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 generateThumbnail
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function generateThumbnail( File $file, array $params, $thumbName, $thumbPath ) {
$attemptFailureEpoch = $this->getConfig( MainConfigNames::AttemptFailureEpoch );
$services = MediaWikiServices::getInstance()->getObjectCacheFactory();
- 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 findConflict
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function findConflict( $node, $parts, $index = 0 ) {
if ( $index >= count( $parts ) ) {
// If we reached the leaf node then a conflict is detected
return $node;
}
- 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 getAll
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getAll( $wiki, $site = null, $params = [], $wikiTags = [] ) {
$params = $this->mergeParams( $wiki, $site, $params, $wikiTags );
$tags = $params['tags'];
$localSettings = [];
foreach ( $this->settings as $varname => $overrides ) {
- 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 insertElement
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function insertElement( $preposition, $refElement, Element $element, $void,
$sourceStart, $sourceLength
) {
[ $parent, $newRef ] = $this->getParentForInsert( $preposition, $refElement );
$parentData = $parent->snData;
- 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 getHelp
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getHelp(): string {
$screenWidth = 80; // TODO: Calculate this!
$tab = " ";
$descWidth = $screenWidth - ( 2 * strlen( $tab ) );
- 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 deleteOptions
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function deleteOptions() {
$dryRun = $this->hasOption( 'dry' );
$option = $this->getArg( 0 );
$fromUserId = (int)$this->getOption( 'fromuserid', 0 );
$toUserId = (int)$this->getOption( 'touserid', 0 ) ?: 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 execute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->run = $this->getOption( 'run', false );
if ( $this->run ) {
$username = $this->getOption( 'user', User::MAINTENANCE_SCRIPT_USER );
- 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 processUsers
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function processUsers( IReadableDatabase $db ) {
$userlistFile = $this->getOption( 'userlist' );
if ( $userlistFile === null ) {
$this->output( "Not generating user list, --userlist was not specified.\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
Function execute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->init();
$batchSize = $this->getBatchSize();
if ( $this->targetTable ) {
- 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 generateMessageFileList
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function generateMessageFileList( array $setupFiles ) {
$IP = MW_INSTALL_PATH;
$outputFile = $this->getOption( 'output' );
$quiet = $this->hasOption( 'quiet' );
- 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 18 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$exampleKeys = [];
$max = 100;
$count = 500;
while ( $count-- ) {
- 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 18 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
// Settings we will display
$res = [];
# Default: dump any wg / wmg variable
- 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
File jquery.ui.core.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Core 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
File PageCommandFactory.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
File SetupDynamicConfig.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This is included by Setup.php to adjust the values of globals before services are initialized.
* It's split into a separate file so it can be tested.
*/
Function MwRcfiltersUiFilterWrapperWidget
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FilterWrapperWidget = function MwRcfiltersUiFilterWrapperWidget(
controller, model, savedQueriesModel, changesListModel, config
) {
config = config || {};
Function fn
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
fn(state) {
return __async(this, null, function* () {
const {
x,
y,