jidaikobo-shibata/a11yc

View on GitHub

Showing 280 of 426 total issues

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

    public static function check($url)
    {
        Validate\Set::log($url, 'meta_refresh', self::$unspec, 5);
        if (Validate::$is_partial === true) return;
        Validate\Set::log($url, 'meta_refresh', self::$unspec, 1);
Severity: Minor
Found in classes/Validate/Check/MetaRefresh.php - About 1 hr to fix

    Method set has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function set(&$array, $key, $value = null)
        {
            if (is_null($key))
            {
                $array = $value;
    Severity: Minor
    Found in libs/kontiki/classes/Arr.php - About 1 hr to fix

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

          public static function check($url)
          {
              Validate\Set::log($url, 'area_has_alt', self::$unspec, 1);
              $str = Element\Get::ignoredHtml($url);
      
      
      Severity: Minor
      Found in classes/Validate/Check/AreaHasAlt.php - About 1 hr to fix

        Method uas has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function uas()
            {
                return array(
                    'using' => array(
                        'name' => A11YC_LANG_UA_USING,
        Severity: Minor
        Found in classes/Values.php - About 1 hr to fix

          Method html has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function html($url, $html, $codes = array(), $ua = 'using', $force = false)
              {
          //        if ( ! is_string($html)) Util::error('invalid HTML was given');
                  $html = ! is_string($html) ? '' : $html;
          
          
          Severity: Minor
          Found in classes/Validate.php - About 1 hr to fix

            Method initDefault has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static function initDefault($name = 'default')
                {
                    $set_utf8 = A11YC_DB_TYPE == 'mysql' ? ' SET utf8' : '';
                    $auto_increment = A11YC_DB_TYPE == 'mysql' ? 'auto_increment' : '' ;
            
            
            Severity: Minor
            Found in classes/Db.php - About 1 hr to fix

              Method makeArray has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function makeArray($css)
                  {
                      // remove comments, import or so
                      $css = preg_replace('/\/\*.+?\*\//is', '', $css);
                      $css = preg_replace('/^@import.+?$/mis', '', $css);
              Severity: Minor
              Found in classes/Model/CssFormat.php - About 1 hr to fix

                Method enuniqueCssUri has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function enuniqueCssUri($url, $css_url = '')
                    {
                        if ($css_url)
                        {
                            $css_urls = explode('/', $css_url);
                Severity: Minor
                Found in classes/Model/Css.php - About 1 hr to fix

                  Method implement has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private static function implement($row)
                      {
                          $ret = array();
                          $cols = explode("</td>", $row);
                          foreach ($cols as $k => $v)
                  Severity: Minor
                  Found in classes/Controller/Test.php - About 1 hr to fix

                    Method getTitles has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private static function getTitles($techs)
                        {
                            $results = array();
                            foreach ($techs as $tech)
                            {
                    Severity: Minor
                    Found in classes/Controller/Tech.php - About 1 hr to fix

                      Method fetchHtmlFromInternet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function fetchHtmlFromInternet($url, $ua = 'using')
                          {
                              $ua = $ua == 'using' ? Input::userAgent() : $ua;
                              if ( ! is_string($ua)) Util::error();
                              if (isset(static::$htmls[$url][$ua])) return static::$htmls[$url][$ua];
                      Severity: Minor
                      Found in classes/Model/Html.php - About 1 hr to fix

                        Function isFieldsExist has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function isFieldsExist($table, $fields = array(), $name = 'default')
                            {
                                if ( ! static::isTableExist($table, $name)) return false;
                        
                                $retvals = array();
                        Severity: Minor
                        Found in libs/kontiki/classes/Db.php - About 55 mins 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 forge has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function forge($controller = '\A11yc\Controller\Center', $action = 'actionIndex')
                            {
                                // vals
                                $c = Input::get('c', '');
                                $a = Input::get('a', '');
                        Severity: Minor
                        Found in classes/Route.php - About 55 mins 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 getClosePos has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function getClosePos($target, $elename, $end_pure)
                            {
                                $loop = true;
                                $open_pos = 1;
                                $close_pos = 1;
                        Severity: Minor
                        Found in classes/Element/Get.php - About 55 mins 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 9 (exceeds 5 allowed). Consider refactoring.
                        Open

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

                            public static function edit($is_add = false, $users = array(), $current_user_id = NULL)
                            {
                                $item = array();
                                if ($id = intval(Input::get('id')))
                                {
                        Severity: Minor
                        Found in classes/Controller/IssueUpdate.php - About 55 mins 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 implement has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function implement($row)
                            {
                                $ret = array();
                                $cols = explode("</td>", $row);
                                foreach ($cols as $k => $v)
                        Severity: Minor
                        Found in classes/Controller/Test.php - About 55 mins 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 importResult has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function importResult($results)
                            {
                                if ( ! isset($results['result'])) return;
                        
                                foreach ($results['result'] as $url => $vals)
                        Severity: Minor
                        Found in classes/Controller/DataImport.php - About 55 mins 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 getImages has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function getImages($url, $base_uri = '', $target_html = '')
                            {
                                $retvals = array();
                                $str = empty($target_html) ? Element\Get::ignoredHtml($url) : $target_html;
                                $n = 0;
                        Severity: Minor
                        Found in classes/Image.php - About 55 mins 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