Showing 280 of 426 total issues
Function getReversedValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function getReversedValue($results)
{
$results2 = array();
foreach ($results as $k => $v)
{
- 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 trashControl
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function trashControl($act)
{
$id = intval(Input::get('id'));
$item = Model\Icl::fetch($id);
if (empty($item)) Util::error('Icl not found');
- 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 trashControl
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function trashControl($act)
{
$id = intval(Input::get('id'));
$item = Model\Issue::fetch($id);
if (empty($item)) Util::error('issue not found');
- 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 passed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function passed($cs, $yml)
{
$passed = array();
foreach ($yml['passes'] as $code => $codes)
{
- 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 key2link
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function key2link($text, $doc_url = '')
{
preg_match_all("/\[[^\]]+?\]/", $text, $ms);
if ( ! $ms[0]) return $text;
- 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 criterionsOfLevels
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function criterionsOfLevels()
{
$yml = Yaml::fetch();
// levels
$levels = 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
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return '';
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $array;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return static::value($default);
Avoid too many return
statements within this method. Open
return static::$langs[$url];
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Function targetCriterions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function targetCriterions()
{
$retvals = array();
$target_level = (int) Model\Setting::fetch('target_level');
if (empty($target_level)) return $retvals;
- 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 html
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function html($url, $html, $codes = array(), $ua = 'using', $force = false)
{
// if ( ! is_string($html)) Util::error('invalid HTML was given');
$html = ! is_string($html) ? '' : $html;
- 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 resultStr
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function resultStr($level, $target_level, $is_str = TRUE)
{
$level = intval($level);
if ($target_level == 2 && $level == 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
Function garbageCollection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function garbageCollection ($path)
{
$path = dirname($path);
foreach (glob($path.'/'.'*') as $file)
{
- 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"