jidaikobo-shibata/a11yc

View on GitHub

Showing 426 of 426 total issues

Method issue has 35 lines of code (exceeds 25 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

    Method check has 34 lines of code (exceeds 25 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

      Function a11yc_tooltip has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function a11yc_tooltip(){
      //    console.log('function:'+'a11yc_tooltip');
              var $a11yc_tooltip = $(),
                      title_str = '',
                      position = 0,
      Severity: Minor
      Found in public/assets/js/a11yc.js - About 1 hr to fix

        Method setLabelAndElement has 34 lines of code (exceeds 25 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

          Method __construct has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function __construct($config)
              {
                  $dbtype = strtolower($config['dbtype']);
                  $dbh = false;
          
          
          Severity: Minor
          Found in libs/kontiki/classes/Db.php - About 1 hr to fix

            Method validate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static function validate($url, $target_html, $ua, $do_css_check = false)
                {
                    // check
                    $codes = Validate::$codes;
                    Validate::$do_css_check = $do_css_check;
            Severity: Minor
            Found in classes/Controller/Post.php - About 1 hr to fix

              Method each has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function each($code)
                  {
                      $yml = Yaml::fetch();
                      $tests = Yaml::each('tests');
                      $doc = array();
              Severity: Minor
              Found in classes/Controller/Doc.php - About 1 hr to fix

                Method dt has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function dt($url, $code_str, $place, $key, $current_err, $lv, $num_of_err)
                    {
                        if ( ! is_array($current_err)) Util::error('invalid value was given');
                
                        $yml = Yaml::fetch();
                Severity: Minor
                Found in classes/Message.php - About 1 hr to fix

                  Method replaceUrls has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function replaceUrls($url, $html)
                      {
                  
                          $settings = Model\Setting::fetchAll();
                          if ($settings['base_url'])
                  Severity: Minor
                  Found in classes/Controller/Live.php - About 1 hr to fix

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

                        public static function check($url)
                        {
                            Validate\Set::log($url, 'css_invisible', self::$unspec, 5);
                            Validate\Set::log($url, 'css_background_image_only', self::$unspec, 5);
                            if ( ! static::$do_css_check) return;
                    Severity: Minor
                    Found in classes/Validate/Check/CssInvisibles.php - About 1 hr to fix

                      Method countTags has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function countTags($tags, $ignores)
                          {
                              $tags = is_null($tags) ? array() : $tags;
                      
                              $opens = array();
                      Severity: Minor
                      Found in classes/Validate/Check/SuspiciousElements.php - About 1 hr to fix

                        Function check has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function check()
                            {
                                $pages = array();
                                foreach (Model\Page::fetchAll() as $page)
                                {
                        Severity: Minor
                        Found in classes/Sitecheck/ContainPositiveTabindex.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 setSecondaryDeleteElement has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function setSecondaryDeleteElement($str, $eles)
                            {
                                $del_eles = array();
                                $pattern = '/\<label[^\>]*?\>.*?\<\/label\>/is';
                                preg_match_all($pattern, $str, $mms);
                        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 getAriaLabel has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function getAriaLabel($eles, $text = '')
                            {
                                $text = is_bool($text) ? '' : $text;
                        
                                if (strpos($eles, 'aria-label') !== 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 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function check()
                            {
                                $keyword = Input::post('keyword', '');
                                $use_re = Input::post('use_re', false);
                        
                        
                        Severity: Minor
                        Found in classes/Sitecheck/ContainKeyword.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 __get has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function __get($name)
                            {
                                if (property_exists($this, $name))
                                {
                                    // errors?
                        Severity: Minor
                        Found in classes/Guzzle.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 eliminateRadioCheckNames has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function eliminateRadioCheckNames($mms, $radio_check_names)
                            {
                                foreach ($mms as $mm)
                                {
                                    $mm_mod = Element::ignoreElementsByStr($mm);
                        Severity: Minor
                        Found in classes/Validate/Check/Fieldsetless.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 fetch4Validation has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function fetch4Validation($url, $html)
                            {
                                $vals = static::fetchAll();
                                $html = empty($html) ? Element\Get\Each::firstTag(Element\Get::ignoredHtml($url)) : $html;
                        
                        
                        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

                        Function fetchAll has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function fetchAll($force = false)
                            {
                                if ( ! is_null(static::$vals) && ! $force) return static::$vals;
                                $vals = array();
                                $commons = 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 echoGetUrls has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private static function echoGetUrls($url, $urls, $base_url)
                            {
                                // already added
                                if (in_array($url, $urls))
                                {
                        Severity: Minor
                        Found in classes/Controller/PageAdd.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language