bkdotcom/PHPDebugConsole

View on GitHub

Showing 109 of 2,231 total issues

Function expandGroupObjNext has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function expandGroupObjNext ($toggle, $classTarget, $evtTarget, icon, eventNameDone) {
Severity: Minor
Found in src/Debug/js_src/expandCollapse.js - About 35 mins to fix

    Function createFileLinkReplace has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function createFileLinkReplace ($string, matches, text, remove, isUpdate) {
    Severity: Minor
    Found in src/Debug/js_src/FileLinks.js - About 35 mins to fix

      Method bindColumn has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function bindColumn($column, &$param, $type = null, $maxLen = null, $driverData = null)
      Severity: Minor
      Found in src/Debug/Collector/Pdo/Statement.php - About 35 mins to fix

        Function set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function set($path, $value = null)
            {
                if ($path === 'logDest') {
                    $this->setLogDest($value);
                    return;
        Severity: Minor
        Found in src/Debug/Data.php - About 35 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 reduceDataSummary has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function reduceDataSummary()
            {
                /*
                    Remove non-essential summary entries
                */
        Severity: Minor
        Found in src/Debug/Route/ChromeLogger.php - About 35 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 parseParamTest2 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function parseParamTest2($char)
            {
                $endParam = false;
                if ($char === ',') {
                    $endParam = $this->paramParseInfo['depth'] === 1;
        Severity: Minor
        Found in src/Debug/Utility/PhpDoc/ParseMethod.php - About 35 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 manageQueue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function manageQueue()
            {
                $currentTime = \microtime(true);
                foreach ($this->queue as $hash => $curlReqRes) {
                    if (\count($this->processing) >= $this->options['maxConcurrent']) {
        Severity: Minor
        Found in src/CurlHttpMessage/Handler/CurlMulti.php - About 35 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 addIcons has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function addIcons ($node) {
          var $caption
          var $icon = determineIcon($node)
          var isNested = false
          addIconsMisc($node)
        Severity: Minor
        Found in src/Debug/js_src/enhanceEntries.js - About 35 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 getCallerInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getCallerInfo()
            {
                $callerInfo = array();
                $backtrace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 13);
                foreach ($backtrace as $i => $frame) {
        Severity: Minor
        Found in src/Debug/Framework/Yii1_1/LogRouteMeta.php - About 35 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 logListeners has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function logListeners($eventName)
            {
                $listeners = $this->eventDispatcher->getListeners($eventName);
                foreach ($listeners as $i => $listener) {
                    if (!($listener instanceof \Closure)) {
        Severity: Minor
        Found in src/Debug/Framework/Laravel/EventsSubscriber.php - About 35 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 recordTokenArray has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private static function recordTokenArray($token) // phpcs:ignore Generic.Metrics.CyclomaticComplexity
            {
                switch (self::$record) {
                    case 'namespace':
                        switch ($token[0]) {
        Severity: Minor
        Found in src/Debug/Utility/UseStatements.php - About 35 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 buildFooter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function buildFooter()
            {
                $haveTotal = false;
                $cells = array();
                foreach ($this->options['tableInfo']['columns'] as $colInfo) {
        Severity: Minor
        Found in src/Debug/Dump/Html/Table.php - About 35 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 __invoke has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function __invoke(array $parsed, array $info)
            {
                $tagName = $info['tagName'];
                if (self::strStartsWithVariable($parsed['desc'])) {
                    \preg_match('/^(\S*)/', $parsed['desc'], $matches);
        Severity: Minor
        Found in src/Debug/Utility/PhpDoc/ParseParam.php - About 35 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 findGroupEnd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function findGroupEnd($id, $logEntries)
            {
                $depth = 0;
                $inGroup = false;
                foreach ($logEntries as $key => $logEntry) {
        Severity: Minor
        Found in src/Debug/Data.php - About 35 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 walkBranch has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function walkBranch($keys, $val)
            {
                while (\is_array($val)) {
                    if (\count($val) > 1) {
                        break;
        Severity: Minor
        Found in src/Debug/Utility/FileTree.php - About 35 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 getReflectorFromString has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private static function getReflectorFromString($string)
            {
                $matches = [];
                \preg_match(self::$regex, $string, $matches);
                $defaults = \array_fill_keys(['class', 'constant', 'property', 'method', 'function'], null);
        Severity: Minor
        Found in src/Debug/Utility/Reflection.php - About 35 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 logSessionVals has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function logSessionVals($sessionNamePassed)
            {
                $namePrev = null;
                if (session_status() !== PHP_SESSION_ACTIVE) {
                    if ($sessionNamePassed === null) {
        Severity: Minor
        Found in src/Debug/Plugin/LogEnv.php - About 35 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 findEvalCodeLines has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private static function findEvalCodeLines($frames)
            {
                foreach ($frames as $frame) {
                    if (!isset($frame['function'])) {
                        return false;
        Severity: Minor
        Found in src/Backtrace/Context.php - About 35 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 curlMultiInfoRead has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function curlMultiInfoRead()
            {
                while ($done = \curl_multi_info_read($this->multiHandle)) {
                    if ($done['msg'] !== CURLMSG_DONE) {
                        // if it's not done, then it would be premature to remove the handle.
        Severity: Minor
        Found in src/CurlHttpMessage/Handler/CurlMulti.php - About 35 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 getGroupLabel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getGroupLabel()
            {
                $label = \preg_replace('/[\r\n\s]+/', ' ', $this->sql);
                $label = $this->debug->sql->replaceParams($label, $this->params);
                $parsed = $this->debug->sql->parse($label);
        Severity: Minor
        Found in src/Debug/Collector/StatementInfo.php - About 35 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