Showing 9,710 of 11,773 total issues
File ChangesListSpecialPage.php
has 1321 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 SpecialUndelete.php
has 1294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Implements Special:Undelete
*
* This program is free software; you can redistribute it and/or modify
File SwiftFileBackend.php
has 1290 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* OpenStack Swift based file backend.
*
* This program is free software; you can redistribute it and/or modify
Title
has 168 functions (exceeds 20 allowed). Consider refactoring. Open
class Title implements LinkTarget, PageIdentity {
use WikiAwareEntityTrait;
use LinkTargetTrait;
/** @var MapCacheLRU|null */
Function UMD
has 665 lines of code (exceeds 25 allowed). Consider refactoring. Open
})(commonjsGlobal, function UMD() {
function fuzzysortNew(instanceOptions) {
var fuzzysort = {
single: function single(search, target, options) {
if (search == 'farzher') return {
Function getMetadata
has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring. Open
public static function getMetadata( $filename ) {
self::$pngSig = pack( "C8", 137, 80, 78, 71, 13, 10, 26, 10 );
self::$crcSize = 4;
/* based on list at http://owl.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html#TextualData
* and https://www.w3.org/TR/PNG/#11keywords
- 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 SQLPlatform.php
has 1252 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 ResourceLoader.php
has 1247 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 chosen.jquery.js
has 1238 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.8.2
Function getHelpInternal
has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring. Open
private static function getHelpInternal( IContextSource $context, array $modules,
array $options, &$haveModules
) {
$out = '';
- 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 diff
has 622 lines of code (exceeds 25 allowed). Consider refactoring. Open
QUnit.diff = function () {
function DiffMatchPatch() {}
// DIFF FUNCTIONS
Function setup
has a Cognitive Complexity of 152 (exceeds 5 allowed). Consider refactoring. Open
setup(props, { emit, slots, attrs }) {
const computedMenuItems = computed(() => {
const menuItemsWithFooter = props.footer && props.menuItems ? [...props.menuItems, props.footer] : props.menuItems;
return menuItemsWithFooter.map((menuItem) => __spreadProps(__spreadValues({}, menuItem), {
id: useGeneratedId("menu-item")
- 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 sprintfDate
has a Cognitive Complexity of 151 (exceeds 5 allowed). Consider refactoring. Open
public function sprintfDate( $format, $ts, DateTimeZone $zone = null, &$ttl = 'unused' ) {
// @phan-suppress-previous-line PhanTypeMismatchDefault Type mismatch on pass-by-ref args
$s = '';
$raw = false;
$roman = 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
DBConnRef
has 153 functions (exceeds 20 allowed). Consider refactoring. Open
class DBConnRef implements IMaintainableDatabase {
/** @var ILoadBalancer */
private $lb;
/** @var Database|null Live connection handle */
private $conn;
Function check
has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring. Open
public function check( $fix = false, $xml = '' ) {
$dbr = $this->getReplicaDB();
if ( $fix ) {
print "Checking, will fix errors if possible...\n";
} else {
- 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 146 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
// Before doing anything at all, let's check permissions
$this->checkUserRightsAny( 'deletedhistory' );
$this->addDeprecation( 'apiwarn-deprecation-deletedrevs', 'action=query&list=deletedrevs' );
- 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 WatchedItemStore.php
has 1155 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
use MediaWiki\Cache\LinkBatchFactory;
use MediaWiki\Config\ServiceOptions;
Function execute
has a Cognitive Complexity of 144 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->useTransactionalTimeLimit();
$user = $this->getUser();
$params = $this->extractRequestParams();
- 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 SqlBagOStuff.php
has 1141 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Object caching using a SQL database.
*
* This program is free software; you can redistribute it and/or modify
Language
has 148 functions (exceeds 20 allowed). Consider refactoring. Open
class Language implements Bcp47Code {
use DebugInfoTrait;
/** @var string */
public $mCode;