Showing 4,334 of 7,873 total issues
File update.class.php
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of MODX Revolution.
*
* Copyright (c) MODX, LLC. All Rights Reserved.
Method Statement
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function Statement($x)
{
$tt = $this->t->get();
$n2 = null;
Function loadTVs
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
public function loadTVs($reloadData = array()) {
$this->setPlaceholder('wctx',$this->resource->get('context_key'));
$_GET['wctx'] = $this->resource->get('context_key');
$this->fireOnTVFormRender();
- 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 modx.panel.js
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
Ext.namespace('MODx.panel');
MODx.Panel = function(config) {
config = config || {};
Ext.applyIf(config,{
File modelement.class.php
has 598 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of MODX Revolution.
*
* Copyright (c) MODX, LLC. All Rights Reserved.
Method compileTag2
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function compileTag2($tag, $args, $parameter)
{
$plugin_type = '';
// $args contains the attributes parsed and compiled by the lexer/parser
// assume that tag does compile into code, but creates no HTML output
Function outputClasses
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
public function outputClasses($path) {
$newClassGeneration= false;
$newPlatformGeneration= false;
$platform= $this->model['platform'];
if (!is_dir($path)) {
- 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 65 (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 construct
has a Cognitive Complexity of 65 (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
File modmanagercontroller.class.php
has 591 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 fromCache
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
public function fromCache($signature, $class= '', $options= array()) {
$result= null;
if ($this->getOption(xPDO::OPT_CACHE_DB, $options)) {
if ($signature && $this->getCacheManager()) {
$sig= '';
- 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 createBody
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createBody()
{
$body = '';
//Create unique IDs and preset boundaries
$this->uniqueid = $this->generateId();
Method WatermarkText
has 250 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function WatermarkText(&$gdimg, $text, $size, $alignment, $hex_color='000000', $ttffont='', $opacity=100, $margin=5, $angle=0, $bg_color=false, $bg_opacity=0, $fillextend='', $lineheight=1.0) {
// text watermark requested
if (!$text) {
return false;
}
File modx.panel.user.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @class MODx.panel.User
* @extends MODx.FormPanel
* @param {Object} config An object of configuration properties
* @xtype modx-panel-user
File modx.grid.source.properties.js
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
MODx.grid.SourceProperties = function(config) {
config = config || {};
this.exp = new Ext.grid.RowExpander({
tpl : new Ext.Template(
'<p class="modx-property-description"><i>{desc_trans}</i></p>'
Function privFileDescrExpand
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
function privFileDescrExpand(&$p_filedescr_list, &$p_options)
{
$v_result=1;
// ----- Create a result list
- 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
AmazonS3
has 67 functions (exceeds 20 allowed). Consider refactoring. Open
class AmazonS3 extends CFRuntime
{
/*%******************************************************************************************%*/
// CLASS CONSTANTS
Function initComponent
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
initComponent : function() {
Ext.ux.UploadDialog.Dialog.superclass.initComponent.call(this);
// Setting automata protocol
var tt = {
Function getCachePath
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
public function getCachePath() {
$cachePath= false;
if (empty($this->xpdo->cachePath)) {
if (!isset ($this->xpdo->config['cache_path'])) {
while (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_modifier_escape
has a Cognitive Complexity of 62 (exceeds 5 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;
- 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"