Showing 4,334 of 7,873 total issues
Function get_debug_vars
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
public function get_debug_vars($obj)
{
$config_vars = array();
foreach ($obj->config_vars as $key => $var) {
$config_vars[ $key ][ 'value' ] = $var;
- 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 getGeneralFields
has 323 lines of code (exceeds 25 allowed). Consider refactoring. Open
,getGeneralFields: function(config) {
var itemsRight = [{
id: 'modx-user-newpassword'
,name: 'newpassword'
,xtype: 'hidden'
Function privAddFile
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
function privAddFile($p_filedescr, &$p_header, &$p_options)
{
$v_result=1;
// ----- Working variable
- 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 cloudfront.class.php
has 699 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 compile
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$output = $parameter[ 'value' ];
- 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 smarty_function_html_select_time
has 318 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_function_html_select_time($params, Smarty_Internal_Template $template)
{
$template->_checkPlugins(
array(
array(
File modx.tree.js
has 696 lines of code (exceeds 250 allowed). Consider refactoring. Open
Ext.namespace('MODx.tree');
/**
* Generates the Tree in Ext. All modTree classes extend this base class.
*
* @class MODx.tree.Tree
Function Lightbox
has 316 lines of code (exceeds 25 allowed). Consider refactoring. Open
Ext.ux.Lightbox = (function(){
var els = {},
images = [],
activeImage,
initialized = false,
Function deleteTree
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
public function deleteTree($dirname, $options= array('deleteTop' => false, 'skipDirs' => false, 'extensions' => array('.cache.php'))) {
$result= false;
if (is_dir($dirname)) { /* Operate on dirs only */
if (substr($dirname, -1) != '/') {
$dirname .= '/';
- 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 smarty_function_html_select_date
has 313 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_function_html_select_date($params, Smarty_Internal_Template $template)
{
$template->_checkPlugins(
array(
array(
File modx.panel.tv.js
has 686 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Loads the TV panel
*
* @class MODx.panel.TV
* @extends MODx.FormPanel
Function EventManager
has 310 lines of code (exceeds 25 allowed). Consider refactoring. Open
Ext.EventManager = function(){
var docReadyEvent, docReadyProcId, docReadyState = false;
var resizeEvent, resizeTask, textEvent, textSize;
var E = Ext.lib.Event;
var D = Ext.lib.Dom;
Function Template
has 310 lines of code (exceeds 25 allowed). Consider refactoring. Open
MODx.panel.Template = function(config) {
config = config || {record:{}};
config.record = config.record || {};
config = MODx.setStaticElementsConfig(config, 'template');
Function encodeObject
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
protected function encodeObject($Object, $ObjectDepth = 1, $ArrayDepth = 1)
{
$return = array();
if (is_object($Object)) {
- 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 construct
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
public function construct() {
$constructed= false;
$this->bindings= array ();
$command= strtoupper($this->query['command']);
$sql= $this->query['command'] . ' ';
- 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 Plugin
has 305 lines of code (exceeds 25 allowed). Consider refactoring. Open
MODx.panel.Plugin = function(config) {
config = config || {};
config.record = config.record || {};
config = MODx.setStaticElementsConfig(config, 'plugin');
Method compile
has 303 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$compiler->loopNesting++;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
File xpdoquery.class.php
has 671 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* Copyright 2010-2015 by MODX, LLC.
*
* This file is part of xPDO.
Function _uninstallObject
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
public function _uninstallObject(& $transport, $options, $element, & $parentObject, $fkMeta) {
$uninstalled = false;
$removed = false;
$uninstallObject = true;
$upgrade = 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 compile
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler)
{
$uid = $t_hash = null;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- 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"