Showing 11,545 of 11,545 total issues
Method insert
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert( $data, array $params = [], array $tryStores = null ) {
$tryStores ??= $this->storeFactory->getWriteBaseUrls();
if ( !$tryStores ) {
throw new ExternalStoreException( "List of external stores provided is empty." );
}
Method __construct
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct( array $config = [] ) {
$config = array_merge( [
// Default config values
'precision' => 'day',
'longDisplayFormat' => false,
Method __construct
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct( LanguageFactory $languageFactory ) {
parent::__construct(
$languageFactory,
[
'А',
Method notifyNew
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function notifyNew(
$timestamp,
$page, $minor, $user, $comment, $bot,
$ip = '', $size = 0, $newId = 0, $patrol = 0, $tags = []
) {
Method importFromHandle
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function importFromHandle( $handle ) {
$this->startTime = microtime( true );
$user = User::newSystemUser( User::MAINTENANCE_SCRIPT_USER, [ 'steal' => true ] );
Method processUsers
has 48 lines of code (exceeds 25 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;
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$table = $this->getOption( 'table' );
$key = $this->getOption( 'key' );
$set = $this->getOption( 'set' );
$where = $this->getOption( 'where', null );
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$config = $this->getConfig();
$objectCaches = $config->get( MainConfigNames::ObjectCaches );
$cacheType = $this->getOption( 'cache', $config->get( MainConfigNames::MainCacheType ) );
Function exports
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-karma' );
grunt.loadNpmTasks( 'grunt-stylelint' );
- 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 newFromUserInput
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Title.newFromUserInput = function ( title, defaultNamespace, options ) {
let namespace = parseInt( defaultNamespace ) || NS_MAIN;
// merge options into defaults
options = Object.assign( {
- 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 findMatches
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
FiltersViewModel.prototype.findMatches = function ( query, returnFlat ) {
const result = {},
flatResult = [],
view = this.getViewByTrigger( query.slice( 0, 1 ) ),
items = this.getFiltersByView( view );
- 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 getBoundingClientRect
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
if (includeScale === void 0) {
includeScale = false;
}
if (isFixedStrategy === void 0) {
- 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 getAllPrefixesPregenerated
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getAllPrefixesPregenerated( $local ) {
// Lazily resolve site name
if ( $this->interwikiScopes >= 3 && !$this->thisSite ) {
$this->thisSite = $this->data['__sites:' . $this->wikiId]
?? $this->options->get( MainConfigNames::InterwikiFallbackSite );
- 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 fetchRevisionRecord
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function fetchRevisionRecord() {
if ( $this->fetchResult ) {
return $this->mRevisionRecord;
}
- 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 load
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function load(): array {
$key = $this->cache->makeGlobalKey(
__CLASS__,
$this->source->getHashKey()
);
- 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 getPackageFiles
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getPackageFiles( Context $context ): array {
$main = null;
$files = [];
foreach ( $this->getPages( $context ) as $titleText => $options ) {
- 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 addOneModuleResponse
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function addOneModuleResponse(
Context $context, MinifierState $minifier, $name, Module $module, &$headers
) {
$only = $context->getOnly();
$debug = (bool)$context->getDebug();
- 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 emitDeprecationWarnings
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function emitDeprecationWarnings() {
$deprecatedHooks = $this->registry->getDeprecatedHooks();
$extensionHooks = $this->registry->getExtensionHooks();
foreach ( $extensionHooks as $name => $handlers ) {
- 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 getFileHashes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getFileHashes( Context $context ) {
$files = [];
foreach ( $this->getStyleFiles( $context ) as $filePaths ) {
foreach ( $filePaths as $filePath ) {
- 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 loadFromDefinition
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFromDefinition() {
if ( $this->definition === null ) {
// Do nothing if definition was already processed
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"