Showing 280 of 426 total issues
Method check
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'suspicious_attributes', self::$unspec, 1);
Validate\Set::log($url, 'duplicated_attributes', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
Method check
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'meanless_element', self::$unspec, 1);
Validate\Set::log($url, 'meanless_element_timing', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
Function getText
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function getText($url, $code_str, $place, $key, $num_of_err)
{
$yml = Yaml::fetch();
$current_err = Validate::setCurrentErr($url, $code_str);
- 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 check
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'img_input_has_alt', self::$unspec, 1);
$str = Element\Get::ignoredHtml($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 scopeless
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private static function scopeless($n, $m, $url, $tstr)
{
// return because simple table
if (substr_count($m, '<th') == substr_count($m, '<td')) return;
- 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 addIclLines
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private static function addIclLines($csv, $pages)
{
$resultspts = Values::resultsOptions();
$criterions = Yaml::each('criterions');
$icls = Model\Icl::fetchAll();
- 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 issue
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function issue()
{
$issues = Model\Issue::fetchByStatus(0);
$settings = Model\Setting::fetchAll();
$pages = Model\Page::fetchAll();
- 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 fetchByStatus
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function fetchByStatus($status, $force = false)
{
$vals = static::fetchAll($force);
$retvals = 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
Method check
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'not_label_but_title', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
$ms = Element\Get::elementsByRe($str, 'ignores', 'tags');
Method assignLinks
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function assignLinks($base_url = '')
{
$removes = array('a11yc_policy', 'a11yc_report', 'a11yc_page', 'url');
if ( ! array_key_exists(Input::get('a11yc_version'), Model\Version::fetchAll()))
{
Method check
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'duplicated_ids', self::$unspec, 1);
Validate\Set::log($url, 'duplicated_accesskeys', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
Method explodeStrings
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function explodeStrings($str)
{
$attrs = array();
foreach (explode(' ', $str) as $k => $v)
{
Method migratePages
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function migratePages($pages_old_tbl)
{
$sql = 'SELECT * FROM '.$pages_old_tbl.';';
$pages = Db::fetchAll($sql);
Method check
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'notice_non_html_exists', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
Method check
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'css_is_meanfull_content', self::$unspec, 5);
if ( ! static::$do_css_check) return;
Validate\Set::log($url, 'css_is_meanfull_content', self::$unspec, 1);
Method resultStr
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function resultStr($level, $target_level, $is_str = TRUE)
{
$level = intval($level);
if ($target_level == 2 && $level == 1)
{
Method check
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'empty_alt_attr_of_img_inside_a', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
Method criterion
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function criterion()
{
// value check
$criterions = Yaml::each('criterions');
$criterion = Input::param('criterion', '');
Method form
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function form($url, $users = array(), $current_user_id = null)
{
// dbio
if (Input::isPostExists())
{
Function check
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'duplicated_ids', self::$unspec, 1);
Validate\Set::log($url, 'duplicated_accesskeys', self::$unspec, 1);
$str = Element\Get::ignoredHtml($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"