Showing 11,545 of 11,545 total issues
Method refreshCounts
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function refreshCounts() {
if ( $this->readOnlyMode->isReadOnly() ) {
return false;
}
File MessagesDe.php
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/** German (Deutsch)
*
* @file
* @ingroup Languages
File HistoryAction.php
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Page history
*
* This program is free software; you can redistribute it and/or modify
Function flip$1
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
const flip$1 = function(options) {
if (options === void 0) {
options = {};
}
return {
Function finish
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
finish: function finish() {
config.current = this;
// Release the timeout and timeout callback references to be garbage collected.
// https://github.com/qunitjs/qunit/pull/1708
Consider simplifying this complex logical expression. Open
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
inst.snapElements[i].snapping = false;
continue;
}
Method __construct
has 32 arguments (exceeds 4 allowed). Consider refactoring. Open
Config $config,
LBFactory $lbFactory,
NamespaceInfo $namespaceInfo,
WatchedItemStoreInterface $watchedItemStore,
RepoGroup $repoGroup,
Method checkArray
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkArray( array $extDependencies ) {
$errors = [];
foreach ( $extDependencies as $extension => $dependencies ) {
foreach ( $dependencies as $dependencyType => $values ) {
switch ( $dependencyType ) {
Method getContentObject
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getContentObject( $defaultContent = null ) {
$services = MediaWikiServices::getInstance();
$request = $this->context->getRequest();
$content = false;
Method pageCounts
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function pageCounts() {
$page = $this->getWikiPage();
$fname = __METHOD__;
$config = $this->context->getConfig();
$cache = $this->wanObjectCache;
AuthManagerSpecialPage
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AuthManagerSpecialPage extends SpecialPage {
/** @var string[] The list of actions this special page deals with. Subclasses should override
* this.
*/
protected static $allowedActions = [
ApiQueryBase
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class ApiQueryBase extends ApiBase {
use ApiQueryBlockInfoTrait;
private ApiQuery $mQueryModule;
private ?IReadableDatabase $mDb;
Method execute
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$this->checkUserRightsAny( 'block' );
$params = $this->extractRequestParams();
$this->requireOnlyOneParameter( $params, 'user', 'userid' );
LocalRepo
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class LocalRepo extends FileRepo {
/** @var callable */
protected $fileFactory = [ LocalFile::class, 'newFromTitle' ];
/** @var callable */
protected $fileFactoryKey = [ LocalFile::class, 'newFromKey' ];
Identical blocks of code found in 2 locations. Consider refactoring. Open
return function () {
const context = this,
args = arguments,
later = function () {
timeout = null;
- 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 115.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
return function () {
const context = this,
args = arguments,
later = function () {
timeout = null;
- 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 115.
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
File Setup.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* The setup for all MediaWiki processes (both web-based and CLI).
*
* The entry point (such as WebStart.php and doMaintenance.php) has these responsibilities:
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function validate( $value, $alldata ) {
if ( !$this->mParams['exists'] ) {
return true;
}
- 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 162.
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
public function validate( $value, $alldata ) {
if ( !$this->mParams['exists'] ) {
return true;
}
- 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 162.
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 3 locations. Consider refactoring. Open
public function __construct(
ApiQuery $query,
$moduleName,
RevisionStore $revisionStore,
IContentHandlerFactory $contentHandlerFactory,
- 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 162.
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