Showing 1,419 of 2,002 total issues
Function makeGrid
has a Cognitive Complexity of 513 (exceeds 5 allowed). Consider refactoring. Open
Open
const makeGrid = function (t, enableResize = undefined, enableReorder = undefined, enableVisib = undefined, enableGridEdit = undefined) {
var isResizeEnabled = enableResize === undefined ? true : enableResize;
var isReorderEnabled = enableReorder === undefined ? true : enableReorder;
var isVisibEnabled = enableVisib === undefined ? true : enableVisib;
var isGridEditEnabled = enableGridEdit === undefined ? true : enableGridEdit;
- 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 makeGrid
has 1594 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const makeGrid = function (t, enableResize = undefined, enableReorder = undefined, enableVisib = undefined, enableGridEdit = undefined) {
var isResizeEnabled = enableResize === undefined ? true : enableResize;
var isReorderEnabled = enableReorder === undefined ? true : enableReorder;
var isVisibEnabled = enableVisib === undefined ? true : enableVisib;
var isGridEditEnabled = enableGridEdit === undefined ? true : enableGridEdit;
File functions.ts
has 2683 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { AJAX } from './ajax.ts';
import { Navigation } from './navigation.ts';
import { CommonParams } from './common.ts';
import tooltip from './tooltip.ts';
File Settings.php
has 2193 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Config;
File ExportSql.php
has 1921 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Set of functions used to build SQL dumps of tables
*/
File monitor.ts
has 1886 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { AJAX } from '../../modules/ajax.ts';
import { Functions } from '../../modules/functions.ts';
import { CommonParams } from '../../modules/common.ts';
import tooltip from '../../modules/tooltip.ts';
File move.ts
has 1741 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { Functions } from '../modules/functions.ts';
import { CommonParams } from '../modules/common.ts';
import { ajaxRemoveMessage, ajaxShowMessage } from '../modules/ajax-message.ts';
import refreshMainContent from '../modules/functions/refreshMainContent.ts';
File makegrid.ts
has 1645 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { AJAX } from './modules/ajax.ts';
import { Functions } from './modules/functions.ts';
import { CommonParams } from './modules/common.ts';
import tooltip from './modules/tooltip.ts';
Settings
has 194 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class Settings
{
/**
* Your phpMyAdmin URL.
*
File services_controllers.php
has 1361 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
use PhpMyAdmin\Config\PageSettings;
Method getGeneric
has 705 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getGeneric(): array
{
return [
// Queries
[
File console.ts
has 1187 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import CodeMirror from 'codemirror';
import { AJAX } from './ajax.ts';
import { Functions } from './functions.ts';
import { CommonParams } from './common.ts';
File Export.php
has 1184 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Config\Settings;
Method getDescriptions
has 517 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function getDescriptions(): array
{
/** @var array<string, string> $descriptionsMap */
static $descriptionsMap = [];
File navigation.ts
has 998 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { CommonParams } from './common.ts';
import { Config } from './config.ts';
import { ajaxRemoveMessage, ajaxShowMessage } from './ajax-message.ts';
import updateNavigationWidthConfig from './navigation/updateNavigationWidthConfig.ts';
File sql.ts
has 963 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { AJAX } from './modules/ajax.ts';
import { Functions } from './modules/functions.ts';
import { Navigation } from './modules/navigation.ts';
import { CommonParams } from './modules/common.ts';
File Descriptions.php
has 948 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Verbose descriptions for settings.
*/
Export
has 111 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class Export
{
/**
* ```php
* $cfg['Export']['format'] = 'sql';
Function getTableDef
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getTableDef(
string $db,
string $table,
bool $showDates = false,
bool $addSemicolon = true,
- 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 export.ts
has 868 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import $ from 'jquery';
import { AJAX } from './modules/ajax.ts';
import { Functions } from './modules/functions.ts';
import { CommonParams } from './modules/common.ts';
import highlightSql from './modules/sql-highlight.ts';