Showing 4,334 of 7,873 total issues
Function processBindings
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function processBindings($value= '', $resourceId= 0, $preProcess = true) {
$bdata = $this->getBindingDataFromValue($value);
if (empty($bdata['cmd'])) return $value;
$modx =& $this->xpdo;
- 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 _send
has 218 lines of code (exceeds 25 allowed). Consider refactoring. Open
_send: function (options, data){
var _this = this, xhr, uid = _this.uid, onLoadFnName = _this.uid + "Load", url = options.url;
api.log('XHR._send:', data);
phpthumb
has 60 functions (exceeds 20 allowed). Consider refactoring. Open
class phpthumb {
// public:
// START PARAMETERS (for object mode and phpThumb.php)
// See phpthumb.readme.txt for descriptions of what each of these values are
Function EventManager
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
Ext.EventManager = function(){
var docReadyEvent,
docReadyProcId,
docReadyState = false,
E = Ext.lib.Event,
Method smarty_modifier_escape
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true)
{
static $_double_encode = null;
static $is_loaded_1 = false;
static $is_loaded_2 = false;
Function Lightbox
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
Ext.ux.Lightbox = (function(){
var els = {},
images = [],
activeImage,
initialized = false,
- 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 _installFiles
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
protected function _installFiles(& $transport, $options) {
$installed = false;
$copied = false;
$vOptions = $this->get($transport, $options);
if (isset ($vOptions['object']) && isset ($vOptions['object']['source']) && isset ($vOptions['object']['target'])) {
- 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 getObjectsInContainer
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function getObjectsInContainer($path) {
$properties = $this->getPropertyList();
$list = $this->getS3ObjectList($path);
$editAction = $this->getEditActionId();
- 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 isCached
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function isCached(Smarty_Internal_Template $_template)
{
if ($this->valid !== null) {
return $this->valid;
}
- 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 getnodes.class.php
has 521 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 getQRSettings
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
MODx.getQRSettings = function(id,va) {
id = id || 'qur';
return [{
layout: 'column'
,border: false
Function get
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function get($key, $options= array()) {
$value= null;
$cacheKey= $this->getCacheKey($key, $options);
if (file_exists($cacheKey)) {
if ($file = @fopen($cacheKey, 'rb')) {
- 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 outputContent
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function outputContent(array $options = array()) {
/* variable pointer for easier access */
$modx =& $this->modx;
/* backwards compat */
- 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 getAttributes
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function getAttributes($compiler, $attributes)
{
$_indexed_attr = array();
if (!isset($this->mapCache[ 'option' ])) {
$this->mapCache[ 'option' ] = array_fill_keys($this->option_flags, 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 prepareResourceNode
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function prepareResourceNode(modResource $resource) {
$qtipField = $this->getProperty('qtipField');
$nodeField = $this->getProperty('nodeField');
$nodeFieldFallback = $this->getProperty('nodeFieldFallback');
$noHref = $this->getProperty('noHref',false);
- 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 getUser
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function getUser($contextKey= '',$forceLoadSettings = false) {
if ($contextKey == '') {
if ($this->context !== null) {
$contextKey= $this->context->get('key');
}
- 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_options
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
function smarty_function_html_options($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
Function parsePhp
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function parsePhp(Smarty_Internal_Templatelexer $lex)
{
$lex->token = Smarty_Internal_Templateparser::TP_PHP;
$close = 0;
$lex->taglineno = $lex->line;
- 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 Rotate
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function Rotate() {
if ($this->ra || $this->ar) {
if (!function_exists('imagerotate')) {
$this->DebugMessage('!function_exists(imagerotate)', __FILE__, __LINE__);
return false;
- 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 package.grid.js
has 510 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Loads a grid of Packages.
*
* @class MODx.grid.Package
* @extends MODx.grid.Grid