Showing 11,545 of 11,545 total issues
Method convertGrammar
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function convertGrammar( $word, $case ) {
$lord = strtolower( $word );
$gender = 'm'; // Nuutnaarel // default
if ( preg_match( '/wiki$/', $lord ) ) {
$gender = 'n'; // Dat xyz-wiki
Method insertRevisionOn
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insertRevisionOn( RevisionRecord $rev, IDatabase $dbw ) {
// TODO: pass in a DBTransactionContext instead of a database connection.
$this->checkDatabaseDomain( $dbw );
$slotRoles = $rev->getSlotRoles();
Method getFormFields
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getFormFields(): array {
$user = $this->getUser();
$title = $this->getTitle();
$article = $this->getArticle();
Method flattenArrayReal
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function flattenArrayReal( $vals, $type = 'ul', $noHtml = false ) {
if ( !is_array( $vals ) ) {
return $vals; // do nothing if not an array;
}
Method submit
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function submit() {
$this->parent->setVarsFromRequest( [ '_RightsProfile', '_LicenseCode',
'wgEnableEmail', 'wgPasswordSender', 'wgEnableUploads',
'_Logo1x', '_LogoWordmark', '_LogoTagline', '_LogoIcon',
'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist',
Method addExtensionOptions
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function addExtensionOptions(): void {
global $wgLang;
$extensions = $this->parent->findExtensions()->value;
'@phan-var array[] $extensions';
Method runFirstQuery
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function runFirstQuery( $resultPageSet = null ) {
$this->addTables( [ $this->bl_table, 'page' ] );
$this->addWhere( "{$this->bl_from}=page_id" );
if ( $resultPageSet === null ) {
$this->addFields( [ 'page_id', 'page_title', 'page_namespace' ] );
Method doMainQuery
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doMainQuery( $tables, $fields, $conds, $query_options,
$join_conds, FormOptions $opts
) {
$dbr = $this->getDB();
$user = $this->getUser();
Method execute
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$this->addHelpLink( 'Help:Tracking categories' );
$this->getOutput()->setPreventClickjacking( false );
Method reportPage
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function reportPage( ?PageIdentity $pageIdentity, $foreignTitle, $revisionCount,
$successCount, $pageInfo ) {
call_user_func_array( $this->mOriginalPageOutCallback, func_get_args() );
if ( $pageIdentity === null ) {
Method getRecognizedTagData
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getRecognizedTagData( array $extratags = [], array $removetags = [] ): array {
static $commonCase, $staticInitialised = false;
$isCommonCase = ( $extratags === [] && $removetags === [] );
if ( $staticInitialised && $isCommonCase && $commonCase ) {
return $commonCase;
Method main
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function main() {
$services = $this->getServiceContainer();
$contLang = $services->getContentLanguage();
$langConverter = $services->getLanguageConverterFactory()->getLanguageConverter( $contLang );
$serverUrl = $services->getUrlUtils()->getServer( PROTO_CANONICAL ) ?? '';
Similar blocks of code found in 2 locations. Consider refactoring. Open
return {
input,
inputWrapper,
menu,
menuId,
- 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 94.
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 ( Array.isArray( colProps ) ) {
for ( i = 0, len = colProps.length; i < len; i++ ) {
this.cols.push( {
index: i,
key: colProps[ i ].key,
- 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 94.
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 ( Array.isArray( rowProps ) ) {
for ( i = 0, len = rowProps.length; i < len; i++ ) {
this.rows.push( {
index: i,
key: rowProps[ i ].key,
- 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 94.
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
return {
activeTab,
activeTabIndex,
activeTabId,
currentDirection,
- 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 94.
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 jquery.ui.tooltip.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Tooltip 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
File StatusValue.php
has 289 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 ApiOpenSearch.php
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
* Copyright © 2008 Brooke Vibber <bvibber@wikimedia.org>
* Copyright © 2014 Wikimedia Foundation and contributors
File SpecialLog.php
has 289 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