Showing 9,711 of 11,779 total issues
Method sprintfDate
has 449 lines of code (exceeds 25 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;
Function createHydrationFunctions
has 442 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createHydrationFunctions(rendererInternals) {
const {
mt: mountComponent,
p: patch,
o: {
File ApiParse.php
has 901 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Copyright © 2007 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
Function execute
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$services = $this->getServiceContainer();
$permissionManager = $services->getPermissionManager();
$found = 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 convertGrammarKk_cyrl
has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring. Open
protected function convertGrammarKk_cyrl( $word, $case ) {
$grammarForms =
MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
if ( isset( $grammarForms['kk-kz'][$case][$word] ) ) {
return $grammarForms['kk-kz'][$case][$word];
- 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 execute
has 432 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
// The data is hot but user-dependent, like page views, so we set vary cookies
$this->getMain()->setCacheMode( 'anon-public-user-private' );
// Get parameters
File jquery.tablesorter.js
has 879 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* TableSorter for MediaWiki
*
* Written 2011 Leo Koppelkamm
* Based on tablesorter.com plugin, written (c) 2007 Christian Bach.
Function execute
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$params = $this->extractRequestParams();
$prop = array_fill_keys( $params['prop'], true );
- 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 buildContentNavigationUrlsInternal
has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring. Open
private function buildContentNavigationUrlsInternal() {
if ( $this->contentNavigationCached ) {
return $this->contentNavigationCached;
}
// Display tabs for the relevant title rather than always the title itself
- 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 ImagePage.php
has 871 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 ApiUpload.php
has 871 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Copyright © 2008 - 2010 Bryan Tong Minh <Bryan.TongMinh@Gmail.com>
*
* This program is free software; you can redistribute it and/or modify
Method profilePreferences
has 421 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function profilePreferences(
User $user, IContextSource $context, &$defaultPreferences
) {
// retrieving user name for GENDER and misc.
$userName = $user->getName();
ParserOptions
has 109 functions (exceeds 20 allowed). Consider refactoring. Open
class ParserOptions {
/**
* Default values for all options that are relevant for caching.
* @see self::getDefaults()
Method pageInfo
has 418 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function pageInfo() {
$user = $this->getUser();
$lang = $this->getLanguage();
$title = $this->getTitle();
$id = $title->getArticleID();
File FileModule.php
has 858 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 WikiImporter.php
has 855 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MediaWiki page data importer.
*
* Copyright © 2003,2005 Brooke Vibber <bvibber@wikimedia.org>
File mediawiki.jqueryMsg.js
has 852 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Experimental advanced wikitext parser-emitter.
* See: https://www.mediawiki.org/wiki/Extension:UploadWizard/MessageParser for docs
*
* @author neilk@wikimedia.org
Function run
has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring. Open
public function run( $resultPageSet = null ) {
$user = $this->getUser();
/* Get the parameters of the request. */
$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
Method execute
has 409 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$this->useTransactionalTimeLimit();
$user = $this->getUser();
$params = $this->extractRequestParams();
File RecentChange.php
has 848 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Utility class for creating and accessing recent change entries.
*
* This program is free software; you can redistribute it and/or modify