Showing 4,334 of 7,873 total issues
File modx.panel.resource.js
has 872 lines of code (exceeds 250 allowed). Consider refactoring. Open
MODx.panel.Resource = function(config) {
config = config || {record:{}};
config.record = config.record || {};
Ext.applyIf(config,{
url: MODx.config.connector_url
Method getid3_bmp
has 423 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette=false, $ExtractData=false) {
// shortcuts
$ThisFileInfo['bmp']['header']['raw'] = array();
$thisfile_bmp = &$ThisFileInfo['bmp'];
File phpthumb.gif.php
has 851 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
///////////////////////////////////////////////////////////////////////////////////////////////////
// GIF Util - (C) 2003 Yamasoft (S/C)
// http://www.yamasoft.com
// All Rights Reserved
Function privDeleteByRule
has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring. Open
function privDeleteByRule(&$p_result_list, &$p_options)
{
$v_result=1;
$v_list_detail = array();
- 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 EventManager
has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring. Open
Ext.EventManager = function(){
var docReadyEvent,
docReadyProcId,
docReadyState = false,
E = Ext.lib.Event,
- 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
Method ApplyFilters
has 405 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyFilters() {
if ($this->fltr && is_array($this->fltr)) {
if (!include_once __DIR__ .'/phpthumb.filters.php' ) {
$this->DebugMessage('Error including "'. __DIR__ .'/phpthumb.filters.php" which is required for applying filters ('.implode(';', $this->fltr).')', __FILE__, __LINE__);
return false;
Function remove
has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring. Open
public function remove(array $ancestors= array ()) {
$result= false;
$pk= $this->getPrimaryKey();
if ($pk && $this->xpdo->getConnection(array(xPDO::OPT_CONN_MUTABLE => true))) {
$primaryKey = $pk;
- 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 modresource.map.inc.php
has 836 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package modx
* @subpackage sqlsrv
*/
File modresource.class.php
has 832 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of MODX Revolution.
*
* Copyright (c) MODX, LLC. All Rights Reserved.
Function getContainerList
has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring. Open
public function getContainerList($path) {
$properties = $this->getPropertyList();
$path = $this->fileHandler->postfixSlash($path);
$bases = $this->getBases($path);
if (empty($bases['pathAbsolute'])) return array();
- 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 privParseOptions
has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring. Open
function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
{
$v_result=1;
// ----- Read the options
- 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 smarty_internal_configfileparser.php
has 816 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class TPC_yyStackEntry
{
public $stateno; /* The state-number */
Function writeSchema
has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring. Open
public function writeSchema($schemaFile, $package= '', $baseClass= '', $tablePrefix= '', $restrictPrefix= false) {
if (empty ($package))
$package= $this->manager->xpdo->package;
if (empty ($baseClass))
$baseClass= 'xPDOObject';
- 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 getResource
has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring. Open
public function getResource($method, $identifier, array $options = array()) {
$resource = null;
if ($method == 'alias') {
$resourceId = $this->modx->findResource($identifier);
} else {
- 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 smarty_internal_templatelexer.php
has 794 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of Smarty.
*
* (c) 2015 Uwe Tews
File sdk.class.php
has 792 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
Function parseConditions
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
public function parseConditions($conditions, $conjunction = xPDOQuery::SQL_AND) {
$result= array ();
$pk= $this->xpdo->getPK($this->_class);
$pktype= $this->xpdo->getPKType($this->_class);
$fieldMeta= $this->xpdo->getFieldMeta($this->_class, 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
Function validate
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
public function validate(array $parameters = array()) {
$validated= false;
$this->reset();
$stopOnFail= isset($parameters['stopOnFail']) && $parameters['stopOnFail']
? 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
Function smarty_function_html_select_time
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
function smarty_function_html_select_time($params, Smarty_Internal_Template $template)
{
$template->_checkPlugins(
array(
array(
- 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 2.5-cleanup-script.php
has 787 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Common upgrade script for 2.5 to clean up legacy files for download distributions.
*
* @var modX