Showing 9,710 of 11,773 total issues
File PermissionManager.php
has 1134 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 vuex.global.js
has 1133 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* vuex v4.0.2
* (c) 2021 Evan You
* @license MIT
*/
Parser
has 147 functions (exceeds 20 allowed). Consider refactoring. Open
Open
#[\AllowDynamicProperties]
class Parser {
# Flags for Parser::setFunctionHook
public const SFH_NO_HASH = 1;
Function braceSubstitution
has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring. Open
Open
public function braceSubstitution( array $piece, PPFrame $frame ) {
// Flags
// $text has been filled
$found = 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 fuzzysortNew
has 577 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fuzzysortNew(instanceOptions) {
var fuzzysort = {
single: function single(search, target, options) {
if (search == 'farzher') return {
target: "farzher was here (^-^*)/",
User
has 146 functions (exceeds 20 allowed). Consider refactoring. Open
Open
#[AllowDynamicProperties]
class User implements Authority, UserIdentity, UserEmailContact {
use DebugInfoTrait;
use ProtectedHookAccessorTrait;
use WikiAwareEntityTrait;
Function run
has a Cognitive Complexity of 140 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function run( ApiPageSet $resultPageSet = null ) {
$db = $this->getDB();
$params = $this->extractRequestParams( false );
$result = $this->getResult();
- 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 Installer.php
has 1111 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Base code for MediaWiki installer.
*
* DO NOT PATCH THIS FILE IF YOU NEED TO CHANGE INSTALLER BEHAVIOR IN YOUR PACKAGE!
ParserOutput
has 143 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ParserOutput extends CacheTime implements ContentMetadataCollector {
use GhostFieldAccessTrait;
use JsonUnserializableTrait;
// This is used to break cyclic dependencies and allow a measure
// of compatibility when new methods are added to ContentMetadataCollector
File File.php
has 1104 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @defgroup FileAbstraction File abstraction
* @ingroup FileRepo
*
File WANObjectCache.php
has 1092 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 FileBackendStore.php
has 1074 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Base class for all backends using particular storage medium.
*
* This program is free software; you can redistribute it and/or modify
File jquery.ui.tabs.js
has 1064 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Tabs 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
File ApiBase.php
has 1060 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Copyright © 2006, 2010 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
File SkinTemplate.php
has 1058 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Copyright © Gabriel Wicke -- http://www.aulinx.de/
*
* This program is free software; you can redistribute it and/or modify
File
has 135 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class File implements MediaHandlerState {
use ProtectedHookAccessorTrait;
// Bitfield values akin to the revision deletion constants
public const DELETED_FILE = 1;
Method buildDomTreeArrayFromText
has 523 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function buildDomTreeArrayFromText( $text, $flags ) {
$forInclusion = ( $flags & self::DOM_FOR_INCLUSION );
$langConversionDisabled = ( $flags & self::DOM_LANG_CONVERSION_DISABLED );
$xmlishElements = $this->parser->getStripList();
File Sanitizer.php
has 1036 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* HTML sanitizer for %MediaWiki.
*
* Copyright © 2002-2005 Brooke Vibber <bvibber@wikimedia.org> et al
File HTMLForm.php
has 1034 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* HTML form generation and submission handling.
*
File CoreParserFunctions.php
has 1027 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Parser functions provided by MediaWiki core
*
* This program is free software; you can redistribute it and/or modify