Showing 280 of 426 total issues
Method fetchArr
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function fetchArr($key, $url = '*', $default = array(), $force = false, $version = null, $group_id = null)
Function enuniqueUri
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function enuniqueUri($uri, $base_uri = '')
{
if (empty($uri)) return '';
$base_url = $base_uri ?: Model\Data::baseUrl();
- 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 updateIssues
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function updateIssues()
{
$sql = 'SELECT `version` FROM '.A11YC_TABLE_ISSUES.' GROUP BY `version`;';
$versions = self::versionArray(Db::fetchAll($sql));
- 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 importChecklist
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function importChecklist($results)
{
if ( ! isset($results['check'])) return;
foreach ($results['check'] as $url => $vals)
- 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 addEachIclAndCriterion
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function addEachIclAndCriterion($zip, $urls)
{
$n =1;
$exist = false;
foreach ($urls as $url)
- 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 decompose
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function decompose($text)
{
$rets = array();
// icl table
- 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 filterSearch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function filterSearch($pages, $words)
{
if (empty($words)) return $pages;
$vals = array();
foreach ($pages as $page)
- 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 fetchOne
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function fetchOne($key, $url = '*', $default = '', $force = false, $version = null, $group_id = null)
Method fetch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function fetch($key, $url = '*', $default = array(), $force = false, $version = null, $group_id = null)
Function updateResults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function updateResults($url)
{
$bulk = Input::postArr('results');
$vals = array();
$current = Model\Result::fetch($url);
- 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 updateChecklist
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function updateChecklist($url)
{
$techs = Yaml::each('techs');
$sql = 'SELECT `version` FROM '.A11YC_TABLE_CHECKS.' WHERE `url` = ? GROUP BY `version`;';
$versions = self::versionArray(Db::fetchAll($sql, array($url)));
- 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 techVals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function techVals($vals)
{
if (isset($vals['tech_url']) && ! empty($vals['tech_url']))
{
$techs = 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
Function tidyAlt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function tidyAlt($k, $v, $retvals)
{
if (isset($v['attrs']['alt']))
{
// empty alt
- 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
Consider simplifying this complex logical expression. Open
if (strlen($uri) >= 2 && $uri[0] == '/' && $uri[1] != '/')
{
$uri = $base_url.$uri;
}
// started with "./"
Consider simplifying this complex logical expression. Open
if (strlen($url) >= 2 && $url[0] == '.' && $url[1] == '/')
{
$url = $css_url.substr($url, 1);
}
// started with "../"
Method getText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function getText($url, $code_str, $place, $key, $num_of_err)
Method duplicatedNames
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function duplicatedNames($k, $url, $whole_form, $v, $action)
Method addErrorToHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$url,
$error_id,
$s_errors,
$ignore_vals = '',
$issue_html = ''
Method replaceSafeStrings
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function replaceSafeStrings($replaces, $k, $lv, $error_id, $current_err)
Method error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function error($url, $error_name, $count, $id, $str)