Showing 280 of 426 total issues
Method check
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
$error_names = array(
'table_use_th',
'table_use_scope',
Method check
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'cannot_contain_newline', self::$unspec, 1);
Validate\Set::log($url, 'unbalanced_quotation', self::$unspec, 1);
Validate\Set::log($url, 'cannot_contain_multibyte_space', self::$unspec, 1);
Method check
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'same_urls_should_have_same_text', self::$unspec, 1);
// urls
Function set_wrapper_position
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function set_wrapper_position(){
// need relocate wrapper for changing objs height by load images
// if(! $(this).hasClass('a11yc_live_noheight')) return;
Method check
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
$error_names = array(
'labelless',
'submitless',
Method replaceErrorStrs
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function replaceErrorStrs($html)
{
// remove "back" link
$html = preg_replace(
'/\<a href="#index_.+?a11yc_back_link.+?\<\/a\>/i',
Method getUrls
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function getUrls($url)
{
// fetch attributes
$ua = 'using';
$html = Model\Html::fetch($url, $ua);
Function check
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'appropriate_heading_descending', 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 setLabelAndElement
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private static function setLabelAndElement($ms)
{
$eles = array();
$fors = 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 textFromElement
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function textFromElement($str)
{
$text = '';
// alt of img
- 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 getAriaLabelledby
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private static function getAriaLabelledby($eles, $str, $text = '')
{
$text = is_bool($text) ? '' : $text;
if (strpos($eles, 'aria-labelledby') !== false)
- 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 14 (exceeds 5 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);
- 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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'alt_attr_of_img', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
$ms = Element\Get::elementsByRe($str, 'ignores', 'imgs');
Method addPath
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function addPath($path, $namespace = '')
{
spl_autoload_register(
function ($class_name) use ($path, $namespace)
{
Method check
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
$error_names = array(
'css_suspicious_paren_num',
'css_suspicious_props',
Method issue
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function issue($users = array(), $current_user_id = NULL, $is_admin = false)
{
$id = intval(Input::get('id'));
$issue = Model\Issue::fetch($id);
if (empty($issue) || Arr::get($issue, 'trash') == 1) Util::error('issue not found');
Method getFields
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getFields($table, $name = 'default')
{
if ( ! static::isTableExist($table, $name)) return array();
$instance = static::instance($name);
$retvals = array();
Method each
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function each($url, $base_url = '', $is_assign = false, $is_center = false)
{
$page = Model\Page::fetch($url);
if ( ! $page || ! $page['done'] || $page['trash'])
Method settings
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function settings()
{
$sql = 'SELECT * FROM '.A11YC_TABLE_SETUP_OLD.';';
$settings = Db::fetchAll($sql);
if (empty($settings[0])) return;
Method revertHtml
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function revertHtml($html)
{
if (is_array($html)) Util::error('invalid HTML was given');
$retval = str_replace(