Showing 11,545 of 11,545 total issues
Method getAllowedParams
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAllowedParams() {
return [
'prop' => [
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_DEFAULT => 'timestamp|user',
Method substituteResultWithError
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function substituteResultWithError( Throwable $e ) {
$result = $this->getResult();
$formatter = $this->getErrorFormatter();
$config = $this->getConfig();
$errorCodes = [];
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$performer = $this->getUser();
$params = $this->extractRequestParams();
$this->requireOnlyOneParameter( $params, 'id', 'user', 'userid' );
Method runQuery
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function runQuery( $resultPageSet, $limit, $start, $startId, $end ) {
$params = $this->extractRequestParams();
$this->resetQueryParams();
$this->addTables( 'page' );
Method changePageLanguage
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function changePageLanguage( IContextSource $context, Title $title,
$newLanguage, $reason = "", array $tags = [], IDatabase $dbw = null ) {
// Get the default language for the wiki
$defLang = $context->getConfig()->get( MainConfigNames::LanguageCode );
Method formatValue
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function formatValue( $field, $value ) {
$linkRenderer = $this->getLinkRenderer();
switch ( $field ) {
case 'thumb':
$opt = [ 'time' => wfTimestamp( TS_MW, $this->mCurrentRow->img_timestamp ) ];
Method claimRandom
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function claimRandom( $uuid, $rand, $gte ) {
$dbw = $this->getPrimaryDB();
// Check cache to see if the queue has <= OFFSET items
$tinyQueue = $this->wanCache->get( $this->getCacheKey( 'small' ) );
Method parse
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse(
$text, PageReference $page, ParserOptions $options,
$linestart = true, $clearState = true, $revid = null
) {
if ( $clearState ) {
Method getExistsWarning
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getExistsWarning( $file ) {
if ( $file->exists() ) {
return [ 'warning' => 'exists', 'file' => $file ];
}
Method parseQuery
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseQuery( $filteredText, $fulltext ) {
$lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); // Minus syntax chars (" and *)
$searchon = '';
$this->searchTerms = [];
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$lastName = $this->getOption( 'start', '' );
$repo = $this->getServiceContainer()->getRepoGroup()->getLocalRepo();
$dbr = $repo->getReplicaDB();
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$benches = [];
$schemaSource = new ReflectionSchemaSource( MainConfigSchema::class );
$schema = $schemaSource->load();
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
global $wgHTCPRouting;
if ( $this->hasOption( 'htcp-dest' ) ) {
$parts = explode( ':', $this->getOption( 'htcp-dest' ), 2 );
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$dbw = $this->getDB( DB_PRIMARY );
$batchSize = $this->getBatchSize();
if ( !$dbw->tableExists( 'page_restrictions', __METHOD__ ) ) {
File MessagesMr.php
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/** Marathi (मराठी)
*
* @file
* @ingroup Languages
Similar blocks of code found in 2 locations. Consider refactoring. Open
OO.ui.ToolGroup.prototype.onMouseOverFocus = function ( e ) {
const tool = this.findTargetTool( e );
if ( this.pressed && this.pressed === tool ) {
this.pressed.setActive( 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 86.
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
ordinal: function (number, period) {
switch (period) {
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
- 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 86.
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
OO.ui.ToolGroup.prototype.onMouseOutBlur = function ( e ) {
const tool = this.findTargetTool( e );
if ( this.pressed && this.pressed === tool ) {
this.pressed.setActive( false );
- 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 86.
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
ordinal: function (number, period) {
switch (period) {
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
- 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 86.
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
OO.ui.SearchInputWidget.prototype.onIndicatorKeyDown = function ( e ) {
if ( e.keyCode === OO.ui.Keys.ENTER ) {
// Clear the text field
this.setValue( '' );
this.focus();
- 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 86.
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