Showing 11,545 of 11,545 total issues
Method appendGeneralInfo
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function appendGeneralInfo( $property ) {
$config = $this->getConfig();
$mainPage = Title::newMainPage();
$logo = SkinModule::getAvailableLogos( $config, $this->getLanguage()->getCode() );
Method registerFilters
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function registerFilters() {
parent::registerFilters();
// legacy 'extended' filter
$this->registerFilterGroup( new ChangesListBooleanFilterGroup( [
Method execute
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$mcc = new MemcachedClient( [
'persistent' => true,
'debug' => $this->hasOption( 'debug' ),
] );
PermissionManager
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class PermissionManager {
/** @var string Does cheap permission checks from replica DBs (usable for GUI creation) */
public const RIGOR_QUICK = 'quick';
SessionProvider
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class SessionProvider implements Stringable, SessionProviderInterface {
/** @var LoggerInterface */
protected $logger;
SkinTemplate
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class SkinTemplate extends Skin {
/**
* @var string For QuickTemplate, the name of the subclass which will
* actually fill the template.
*/
Html
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Html {
/** @var bool[] List of void elements from HTML5, section 8.1.2 as of 2016-09-19 */
private static $voidElements = [
'area' => true,
'base' => true,
Xml
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Xml {
/**
* Format an XML element with given attributes and, optionally, text content.
* Element and attribute names are assumed to be ready for literal inclusion.
* Strings are assumed to not contain XML-illegal characters; special
SpecialVersion
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class SpecialVersion extends SpecialPage {
/**
* @var string The current rev id/SHA hash of MediaWiki core
*/
FileBackendDBRepoWrapper
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class FileBackendDBRepoWrapper extends FileBackend {
/** @var FileBackend */
protected $backend;
/** @var string */
protected $repoName;
File MysqlReplicationReporter.php
has 361 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 ApiQueryAllUsers.php
has 361 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
File UserOptionsManager.php
has 361 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (s.lookahead >= MIN_MATCH) {
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
s.head[s.ins_h] = s.strstart;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( clipWidth ) {
// The hacks below are no longer needed for Firefox and Chrome after T349034,
// but may still be needed for Safari. TODO: Test and maybe remove them.
// Set overflow to 'scroll' first to avoid browser bugs causing bogus scrollbars (T67059),
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( clipHeight ) {
// The hacks below are no longer needed for Firefox and Chrome after T349034,
// but may still be needed for Safari. TODO: Test and maybe remove them.
// Set overflow to 'scroll' first to avoid browser bugs causing bogus scrollbars (T67059),
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (s.lookahead >= MIN_MATCH) {
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
s.head[s.ins_h] = s.strstart;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method view
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view() {
$context = $this->getContext();
$useFileCache = $context->getConfig()->get( MainConfigNames::UseFileCache );
# Get variables from query string
File MysqlInstaller.php
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MySQL-specific installer.
*
Method execute
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute( $par ) {
$this->useTransactionalTimeLimit();
$this->checkPermissions();
$this->checkReadOnly();