Showing 948 of 1,194 total issues
File Chart.js
has 11466 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Chart.js v2.9.3
* https://www.chartjs.org
* (c) 2019 Chart.js Contributors
* Released under the MIT License
Function conversions
has 682 lines of code (exceeds 25 allowed). Consider refactoring. Open
var conversions = createCommonjsModule(function (module) {
/* MIT license */
// NOTE: conversions should only return primitive values (i.e. arrays, or
Function execute
has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$output = $this->getOption( 'output', 'default' );
// Select an output engine
switch ( $output ) {
- 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 Hooks.php
has 1144 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace MediaWiki\Extension\Translate\PageTranslation;
use Article;
File ext.translate.editor.js
has 1048 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global autosize */
( function () {
'use strict';
Function core_helpers
has 468 lines of code (exceeds 25 allowed). Consider refactoring. Open
var core_helpers = function() {
// -- Basic js utility methods
helpers$1.where = function(collection, filterCallback) {
File Translate.alias.php
has 934 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Aliases for special pages of Translate extension.
*
* @file
File ManageGroupsSpecialPage.php
has 871 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace MediaWiki\Extension\Translate\Synchronization;
File PageTranslationSpecialPage.php
has 789 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace MediaWiki\Extension\Translate\PageTranslation;
Function prepareEditorColumn
has 332 lines of code (exceeds 25 allowed). Consider refactoring. Open
prepareEditorColumn: function () {
var translateEditor = this,
$discardChangesButton = $( [] ),
$saveButton = $( [] ),
$messageTools = translateEditor.createMessageTools(),
File HookHandler.php
has 680 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types=1 );
namespace MediaWiki\Extension\Translate;
Method execute
has 285 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$output = $this->getOption( 'output', 'default' );
// Select an output engine
switch ( $output ) {
File ext.translate.messagetable.js
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
( function () {
'use strict';
var itemsClass = {
proofread: '.tux-message-proofread',
Function execute
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
public function execute( array $messages ): bool {
$context = RequestContext::getMain();
$output = $context->getOutput();
// Set up diff engine
- 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 ext.translate.special.managetranslatorsandbox.js
has 558 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* JS for special page.
* @author Niklas Laxström
* @author Sucheta Ghoshal
* @author Amir E. Aharoni
File MessageCollection.php
has 546 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare( strict_types = 1 );
namespace MediaWiki\Extension\Translate\MessageLoading;
Method setupTranslate
has 219 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setupTranslate(): void {
global $wgTranslateYamlLibrary;
$hooks = [];
/*
File ext.translate.editor.helpers.js
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Translate editor additional helper functionality
*/
( function () {
'use strict';
Function execute
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$logger = LoggerFactory::getInstance( 'Translate.GroupSynchronization' );
$groupPattern = $this->getOption( 'group' ) ?? '';
$groupSkipPattern = $this->getOption( 'skipgroup' ) ?? '';
$skipGroupSyncCheck = $this->hasOption( 'skip-group-sync-check' );
- 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
Function execute
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function execute(): void {
$this->checkUserRightsAny( self::$right );
$block = $this->getUser()->getBlock();
if ( $block && $block->isSitewide() ) {
$this->dieBlocked( $block );
- 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"