bkdotcom/PHPDebugConsole

View on GitHub

Showing 155 of 175 total issues

File PhpDoc.php has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of PHPDebugConsole
 *
Severity: Minor
Found in src/Debug/Utility/PhpDoc.php - About 2 hrs to fix

    File MySqli.php has 280 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * This file is part of PHPDebugConsole
     *
    Severity: Minor
    Found in src/Debug/Collector/MySqli.php - About 2 hrs to fix

      File ErrorSummary.php has 280 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /**
       * This file is part of PHPDebugConsole
       *
      Severity: Minor
      Found in src/Debug/Route/Html/ErrorSummary.php - About 2 hrs to fix

        File StringUtil.php has 278 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /**
         * This file is part of PHPDebugConsole
         *
        Severity: Minor
        Found in src/Debug/Utility/StringUtil.php - About 2 hrs to fix

          File Html.php has 276 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           * This file is part of PHPDebugConsole
           *
          Severity: Minor
          Found in src/Debug/Utility/Html.php - About 2 hrs to fix

            File ErrorHandler.php has 275 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             * @package   bdk\ErrorHandler
             * @author    Brad Kent <bkfake-github@yahoo.com>
            Severity: Minor
            Found in src/ErrorHandler/ErrorHandler.php - About 2 hrs to fix

              File Error.php has 275 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              /**
               * @package   bdk\ErrorHandler
               * @author    Brad Kent <bkfake-github@yahoo.com>
              Severity: Minor
              Found in src/ErrorHandler/Error.php - About 2 hrs to fix

                Method setParsers has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function setParsers()
                    {
                        $this->parsers = array(
                            array(
                                'tags' => array('param','property','property-read', 'property-write', 'var'),
                Severity: Major
                Found in src/Debug/Utility/PhpDoc.php - About 2 hrs to fix

                  File Html.php has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  /**
                   * This file is part of PHPDebugConsole
                   *
                  Severity: Minor
                  Found in src/Debug/Dump/Html.php - About 2 hrs to fix

                    File Config.php has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /**
                     * This file is part of PHPDebugConsole
                     *
                    Severity: Minor
                    Found in src/Debug/Config.php - About 2 hrs to fix

                      Function searchTokens has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function searchTokens($tokens)
                          {
                              $count = \count($tokens);
                              for ($i = 0; $i < $count; $i++) {
                                  $token = $tokens[$i];
                      Severity: Minor
                      Found in src/Debug/Utility/FindExit.php - About 2 hrs 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 mergeDeepWalk has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static function mergeDeepWalk($arrayDef, $array2)
                          {
                              foreach ($array2 as $k2 => $v2) {
                                  if (\is_array($v2) === false || Php::isCallable($v2, Php::IS_CALLABLE_ARRAY_ONLY)) {
                                      // not array or appears to be a callable
                      Severity: Minor
                      Found in src/Debug/Utility/ArrayUtil.php - About 2 hrs 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

                      File ConfigEvents.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /**
                       * This file is part of PHPDebugConsole
                       *
                      Severity: Minor
                      Found in src/Debug/ConfigEvents.php - About 2 hrs to fix

                        File expandCollapse.js has 252 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * handle expanding/collapsing arrays, groups, & objects
                         */
                        
                        import $ from 'jquery'
                        Severity: Minor
                        Found in src/Debug/js_src/expandCollapse.js - About 2 hrs to fix

                          Function pathGet has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public static function pathGet(&$array, $path, $default = null)
                              {
                                  $path = \array_reverse(self::pathToArray($path));
                                  while ($path) {
                                      $key = \array_pop($path);
                          Severity: Minor
                          Found in src/Debug/Utility/ArrayUtil.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 set has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Config.prototype.set = function (key, val) {
                            var lsObj = {}
                            var setVals = {}
                            var haveLsKey = false
                            if (typeof key === 'object') {
                          Severity: Minor
                          Found in src/Debug/js_src/config.js - 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 profileEnd has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function profileEnd(LogEntry $logEntry)
                              {
                                  $debug = $logEntry->getSubject();
                                  if ($logEntry['meta']['name'] === null) {
                                      \end($this->instances);
                          Severity: Minor
                          Found in src/Debug/Method/Profile.php - About 1 hr to fix

                            Method processLogEntry has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function processLogEntry(LogEntry $logEntry)
                                {
                                    $method = $logEntry['method'];
                                    if (\in_array($method, array('table', 'trace'), true)) {
                                        $logEntry->setMeta(array(
                            Severity: Minor
                            Found in src/Debug/Route/Script.php - About 1 hr to fix

                              Function createFileLink has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function createFileLink (string, remove, foundFiles) {
                                // console.log('createFileLink', $(string).text())
                                var $replace
                                var $string = $(string)
                                var attrs = string.attributes
                              Severity: Minor
                              Found in src/Debug/js_src/FileLinks.js - About 1 hr to fix

                                Function applyFilterToNode has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function applyFilterToNode ($node, channelNameRoot) {
                                  var hiddenWas = $node.is('.filter-hidden')
                                  var i
                                  var isFilterVis = true
                                  var $parentGroup
                                Severity: Minor
                                Found in src/Debug/js_src/filter.js - 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