jidaikobo-shibata/a11yc

View on GitHub

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

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

      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);
      Severity: Minor
      Found in classes/Message.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 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);
      
      
      Severity: Minor
      Found in classes/Validate/Check/ImgInputHasAlt.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 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;
      
      
      Severity: Minor
      Found in classes/Validate/Check/Table.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 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();
      Severity: Minor
      Found in classes/Controller/DownloadCsv.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 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();
      Severity: Minor
      Found in classes/Controller/DownloadIssue.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 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();
      Severity: Minor
      Found in classes/Model/Issue.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 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');
      Severity: Minor
      Found in classes/Validate/Check/NotLabelButTitle.php - About 1 hr to fix

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

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

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

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

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

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

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

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

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

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

                            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);
                            Severity: Minor
                            Found in classes/Validate/Check/DuplicatedIdsAndAccesskey.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

                            Severity
                            Category
                            Status
                            Source
                            Language