Showing 4,334 of 7,873 total issues
Function Event
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
})();Ext.lib.Event = function() {
var loadComplete = false,
unloadListeners = {},
retryCount = 0,
onAvailStack = [],
Method Expression
has 296 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function Expression($x, $stop=false)
{
$operators = array();
$operands = array();
$n = false;
Function password_hash
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
function password_hash($password, $algo, array $options = array()) {
if (!function_exists('crypt')) {
trigger_error("Crypt must be loaded for password_hash to function", E_USER_WARNING);
return null;
}
- 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 ExtractEXIFgetImageSize
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
public function ExtractEXIFgetImageSize() {
$this->DebugMessage('starting ExtractEXIFgetImageSize()', __FILE__, __LINE__);
if (preg_match('#^http:#i', (string)$this->src) && !$this->sourceFilename && $this->rawImageData) {
$this->SourceDataToTempFile();
- 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 FirePHP.php
has 656 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* *** BEGIN LICENSE BLOCK *****
*
* This file is part of FirePHP (http://www.firephp.org/).
Method authenticate
has 293 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function authenticate($bucket, $opt = null, $location = null, $redirects = 0, $nothing = null)
{
/*
* Overriding or extending this class? You can pass the following "magic" keys into $opt.
*
Function importFiles
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
public function importFiles($allowedfiles, $parent, $filepath, $files, $context= 'web', $class= 'modStaticResource', $basefilepath= '', $elements = array()) {
if (!is_array($files))
return;
if ($parent > 0) {
if ($parentResource= $this->modx->getObject('modResource', $parent)) {
- 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 UserGroup
has 289 lines of code (exceeds 25 allowed). Consider refactoring. Open
MODx.panel.UserGroup = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'modx-panel-user-group'
,cls: 'container form-with-labels'
File snoopy.class.php
has 645 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*************************************************
*
* Snoopy - the PHP net client
Function Statement
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
private function Statement($x)
{
$tt = $this->t->get();
$n2 = null;
- 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 createObjectContainer
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
public function createObjectContainer($className) {
$created= false;
if ($this->xpdo->getConnection(array(xPDO::OPT_CONN_MUTABLE => true))) {
$instance= $this->xpdo->newObject($className);
if ($instance) {
- 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 copyTree
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
public function copyTree($source, $target, $options= array()) {
$copied= false;
$source= strtr($source, '\\', '/');
$target= strtr($target, '\\', '/');
if ($source[strlen($source) - 1] == '/') $source = substr($source, 0, strlen($source) - 1);
- 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 modcachemanager.class.php
has 626 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of MODX Revolution.
*
* Copyright (c) MODX, LLC. All Rights Reserved.
File phpthumb.bmp.php
has 626 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org //
Function Ajax
has 275 lines of code (exceeds 25 allowed). Consider refactoring. Open
Ext.lib.Ajax = function() {
var activeX = ['Msxml2.XMLHTTP.3.0',
'Msxml2.XMLHTTP'],
CONTENTTYPE = 'Content-Type';
Function Snippet
has 274 lines of code (exceeds 25 allowed). Consider refactoring. Open
MODx.panel.Snippet = function(config) {
config = config || {};
config.record = config.record || {};
config = MODx.setStaticElementsConfig(config, 'snippet');
Function DB
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
MODx.DB = function() {
return {
testConnection: function() {
Ext.Ajax.request({
url: 'processors/connector.php'
- 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 _httprequest
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "")
{
$cookie_headers = '';
if ($this->passcookies && $this->_redirectaddr)
$this->setcookies();
- 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 process
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
public function process($properties= null, $content= null) {
parent :: process($properties, $content);
if (!$this->_processed) {
$this->_output= $this->_content;
if (is_string($this->_output) && !empty ($this->_output)) {
- 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 69 (exceeds 5 allowed). Consider refactoring. Open
public function outputContent(array $options = array()) {
if (!($this->contentType = $this->modx->resource->getOne('ContentType'))) {
if ($this->modx->getDebug() === true) {
$this->modx->log(modX::LOG_LEVEL_DEBUG, "No valid content type for RESOURCE: " . print_r($this->modx->resource->toArray(), 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"