jidaikobo-shibata/a11yc

View on GitHub

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',
Severity: Minor
Found in classes/Validate/Check/Table.php - About 1 hr to fix

    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);
    Severity: Minor
    Found in classes/Validate/Check/InvalidTag.php - About 1 hr to fix

      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
      Severity: Minor
      Found in classes/Validate/Check/SameUrlsShouldHaveSameText.php - About 1 hr to fix

        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;
        Severity: Minor
        Found in public/assets/js/a11yc_live.js - About 1 hr to fix

          Method check has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function check($url)
              {
                  $error_names = array(
                      'labelless',
                      'submitless',
          Severity: Minor
          Found in classes/Validate/Check/FormAndLabels.php - About 1 hr to fix

            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',
            Severity: Minor
            Found in classes/Controller/Live.php - About 1 hr to fix

              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);
              Severity: Minor
              Found in classes/Controller/PageAdd.php - About 1 hr to fix

                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);
                
                
                Severity: Minor
                Found in classes/Validate/Check/AppropriateHeadingDescending.php - About 1 hr to fix

                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();
                
                
                Severity: Minor
                Found in classes/Validate/Check/NotLabelButTitle.php - About 1 hr to fix

                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
                Severity: Minor
                Found in classes/Element/Get/Each.php - About 1 hr to fix

                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)
                Severity: Minor
                Found in classes/Validate/Check/EmptyLinkElement.php - About 1 hr to fix

                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);
                
                
                Severity: Minor
                Found in classes/Validate/Check/NoticeNonHtmlExists.php - About 1 hr to fix

                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');
                Severity: Minor
                Found in classes/Validate/Check/AltAttrOfImg.php - About 1 hr to fix

                  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)
                              {
                  Severity: Minor
                  Found in libs/kontiki/classes/Autoloader.php - About 1 hr to fix

                    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',
                    Severity: Minor
                    Found in classes/Validate/Check/CssTotal.php - About 1 hr to fix

                      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');
                      Severity: Minor
                      Found in classes/Controller/IssueRead.php - About 1 hr to fix

                        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();
                        Severity: Minor
                        Found in libs/kontiki/classes/Db.php - About 1 hr to fix

                          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'])
                          Severity: Minor
                          Found in classes/Controller/ResultEach.php - About 1 hr to fix

                            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;
                            Severity: Minor
                            Found in classes/Update/One2Two.php - About 1 hr to fix

                              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(
                              Severity: Minor
                              Found in classes/Validate.php - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language