Showing 9,710 of 11,773 total issues
File apisandbox.js
has 1648 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function () {
'use strict';
var ApiSandbox, Util, WidgetMethods, Validators,
windowManager,
formatDropdown,
MediaWikiServices
has 220 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class MediaWikiServices extends ServiceContainer {
use NonSerializableTrait;
/**
* @var bool
Database
has 206 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAwareInterface {
/** @var CriticalSectionProvider|null */
protected $csProvider;
/** @var LoggerInterface */
protected $logger;
File oojs-ui-windows.js
has 1541 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* OOUI v0.49.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2024 OOUI Team and other contributors.
Method makeFormattedData
has 822 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function makeFormattedData( $tags ) {
$resolutionunit = !isset( $tags['ResolutionUnit'] ) || $tags['ResolutionUnit'] == 2 ? 2 : 3;
unset( $tags['ResolutionUnit'] );
// Ignore these complex values
File DefaultPreferencesFactory.php
has 1521 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 jquery.ui.datepicker.js
has 1518 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Datepicker 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
File SpecialPageFactory.php
has 1509 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Factory for handling the special page list and generating SpecialPage objects.
*
* This program is free software; you can redistribute it and/or modify
File LocalFile.php
has 1498 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
OutputPage
has 199 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class OutputPage extends ContextSource {
use ProtectedHookAccessorTrait;
/** Output CSP policies as headers */
public const CSP_HEADERS = 'headers';
File Linker.php
has 1475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Methods to make links and related items.
*
* This program is free software; you can redistribute it and/or modify
File DatabaseBlockStore.php
has 1440 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Class for DatabaseBlock objects to interact with the database
*
* This program is free software; you can redistribute it and/or modify
File Skin.php
has 1438 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 DifferenceEngine.php
has 1431 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* User interface for the difference engine.
*
* This program is free software; you can redistribute it and/or modify
File FormatMetadata.php
has 1399 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Formatting of image metadata values into human readable form.
*
* This program is free software; you can redistribute it and/or modify
File UploadBase.php
has 1378 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Base class for the backend of file upload.
*
* This program is free software; you can redistribute it and/or modify
Function execute
has a Cognitive Complexity of 173 (exceeds 5 allowed). Consider refactoring. Open
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
- 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 LoadBalancer.php
has 1339 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 Article.php
has 1328 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 ParserOutput.php
has 1328 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