Showing 2,378 of 15,774 total issues
Avoid too many return
statements within this method. Open
case 'string[]': return 'string[]';
Avoid too many return
statements within this method. Open
case 'int': return 'integer';
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $this->options = QType::Cast($mixValue, QType::ArrayType);
Avoid too many return
statements within this method. Open
case 'object': return 'mixed';
Avoid too many return
statements within this method. Open
case 'double': return 'QType::Float';
Avoid too many return
statements within this method. Open
return $this->objColumnArray = QType::Cast($mixValue, QType::ArrayType);
Avoid too many return
statements within this method. Open
case 'float[]': return 'float[]';
Avoid too many return
statements within this method. Open
case 'date': return 'QDateTime';
Avoid too many return
statements within this method. Open
case 'double': return 'flt';
Avoid too many return
statements within this method. Open
case 'QDateTime': return 'dtt';
Avoid too many return
statements within this method. Open
default: return 'mix';
Avoid too many return
statements within this method. Open
return $jsValue;
Avoid too many return
statements within this method. Open
case 'string': return 'string';
Avoid too many return
statements within this method. Open
default: return 'QJsClosure';
Function SimpleDisplay
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function SimpleDisplay(){
$arrTimearray = $this->GetTimearray();
$strToReturn = null;
if($arrTimearray['Years'] != 0) {
- 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 processCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
processCommand: function(command) {
if (command.script) {
/** @todo eval is evil, do no evil */
eval (command.script);
}
- 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 Set
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function Set($strKey, $objValue, $intExpireAfterSeconds = null) {
if ($intExpireAfterSeconds !== null) {
$this->objPredisClient->set($strKey, serialize($objValue), 'ex', (int)$intExpireAfterSeconds);
} else {
if(defined('_REDIS_CACHE_PROVIDER_DEFAULT_TTL_') && _REDIS_CACHE_PROVIDER_DEFAULT_TTL_ > 0) {
- 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 IsIPInRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function IsIPInRange($ip, $range) {
$ip = trim($ip);
if (strpos($range, '/') !== false) {
// we are given a IP/mask
list($net, $mask) = explode('/', $range);
- 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 ExecuteJsFunction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function ExecuteJsFunction($strFunctionName /*, ... */) {
$args = func_get_args();
array_shift ($args);
if ($args && end($args) === QJsPriority::High) {
$code = QAjaxResponse::CommandsHigh;
- 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"