jidaikobo-shibata/a11yc

View on GitHub

Showing 280 of 426 total issues

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

              Method criterionDbio has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function criterionDbio($criterion)
                  {
                      $results = Input::postArr('results', NULL);
                      $iclchks = Input::postArr('iclchks', NULL);
                      $chk     = Input::postArr('chk', NULL);
              Severity: Minor
              Found in classes/Controller/BulkCriterion.php - About 1 hr to fix

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

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

                  Method actionValidation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function actionValidation()
                      {
                          // vals
                          $url          = Input::post('url', Input::get('url', ''));
                          $user_agent   = Input::post('user_agent', '');
                  Severity: Minor
                  Found in classes/Controller/Post.php - About 1 hr to fix

                    Method recoverStr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private static function recoverStr($val)
                        {
                            return str_replace(
                                array(
                                    self::$quoted_double,
                    Severity: Minor
                    Found in classes/Element.php - About 1 hr to fix

                      Method isFisrtOfToday has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function isFisrtOfToday ()
                          {
                              if ( ! is_null(static::$is_first_of_day)) return static::$is_first_of_day;
                      
                              $today = date('Y-m-d');
                      Severity: Minor
                      Found in classes/Maintenance.php - About 1 hr to fix

                        Method evaluateTotal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function evaluateTotal()
                            {
                                // fetch pages
                                $args = array(
                                    'list' => 'done',
                        Severity: Minor
                        Found in classes/Evaluate.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language