bkdotcom/PHPDebugConsole

View on GitHub

Showing 161 of 181 total issues

Function clearErrorsHelper has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function clearErrorsHelper(&$log, $clear = true)
    {
        $errorsNotCleared = array();
        foreach ($log as $k => $logEntry) {
            if (\in_array($logEntry['method'], array('error','warn'), true) === false) {
Severity: Minor
Found in src/Debug/Method/Clear.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 findGroupEnd has a Cognitive Complexity of 10 (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 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 getLastFrame has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function getLastFrame()
    {
        $backtrace = \xdebug_get_function_stack();
        $backtrace = \array_reverse($backtrace);
        $frame = false;
Severity: Minor
Found in src/Debug/Utility/FindExit.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 autoArgsTest has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function autoArgsTest($file, $functionStartLine, $callerLine)
    {
        if ($file === null) {
            return false;
        }
Severity: Minor
Found in src/Debug/Method/Group.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 pathSet has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function pathSet(&$array, $path, $val)
    {
        $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 importLegacy has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private static function importLegacy($vals)
    {
        foreach ($vals as $k => $v) {
            if (\is_array($v) === false) {
                continue;
Severity: Minor
Found in src/Debug/Utility/SerializeLog.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 unsubscribe has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function unsubscribe($eventName, $callable)
    {
        if (!isset($this->subscribers[$eventName])) {
            return;
        }
Severity: Minor
Found in src/PubSub/Manager.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 buildOutput has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function buildOutput()
    {
        $lftDefault = \strtr(\ini_get('xdebug.file_link_format'), array(
            '%f' => '%file',
            '%l' => '%line',
Severity: Minor
Found in src/Debug/Route/Html.php - About 1 hr to fix

    Function applyFilterToNode has 27 lines of code (exceeds 25 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

      Method timeLogEntry has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function timeLogEntry(Debug $debug, $method, $args)
          {
              $logEntry = new LogEntry(
                  $debug,
                  $method,
      Severity: Minor
      Found in src/Debug/Method/Time.php - About 1 hr to fix

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

        Severity: Minor
        Found in src/Debug/InternalEvents.php - About 1 hr to fix

          Function rowComparator has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function rowComparator (col, dir, collator) {
            var floatRe = /^([+-]?(?:0|[1-9]\d*)(?:\.\d*)?)(?:[eE]([+-]?\d+))?$/
            return function sortFunction (trA, trB) {
              var a = trA.cells[col].textContent.trim()
              var b = trB.cells[col].textContent.trim()
          Severity: Minor
          Found in src/Debug/js_src/tableSort.js - About 1 hr to fix

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

                private function logSessionSettings($namePassed)
                {
                    $settings = array(
                        array('name' => 'session.cookie_httponly'),
                        array(
            Severity: Minor
            Found in src/Debug/Plugin/LogEnv.php - About 1 hr to fix

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

                  private function publishMetaGet()
                  {
                      $metaVals = array(
                          'processId' => \getmypid(),
                          'HTTP_HOST' => null,
              Severity: Minor
              Found in src/Debug/Route/Wamp.php - About 1 hr to fix

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

                    private function methodTabular(LogEntry $logEntry)
                    {
                        $logEntry->setMeta('undefinedAs', 'null');
                        if ($logEntry['method'] === 'trace') {
                            $logEntry['firephpMeta']['Label'] = 'trace';
                Severity: Minor
                Found in src/Debug/Route/Firephp.php - About 1 hr to fix

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

                      private function getParamsReflection(ReflectionMethod $refMethod, $phpDoc)
                      {
                          $params = array();
                          $collectAttribute = $this->abs['cfgFlags'] & AbstractObject::PARAM_ATTRIBUTE_COLLECT;
                          \set_error_handler(function () {
                  Severity: Minor
                  Found in src/Debug/Abstraction/AbstractObjectMethodParams.php - About 1 hr to fix

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

                        public function processLogEntries(Event $event)
                        {
                            $this->dumper->crateRaw = false;
                            $this->outputEvent = $event;
                            $this->data = $this->debug->data->get();
                    Severity: Minor
                    Found in src/Debug/Route/Firephp.php - About 1 hr to fix

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

                          private static function xdebugGetFunctionStack()
                          {
                              if (static::isXdebugFuncStackAvail() === false) {
                                  return false;
                              }
                      Severity: Minor
                      Found in src/Backtrace/Backtrace.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 searchRecursive has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function searchRecursive($value, $array, $inclKeys = false)
                          {
                              $key = \array_search($value, $array, true);
                              if ($key !== false) {
                                  return array($key);
                      Severity: Minor
                      Found in src/Debug/Utility/ArrayUtil.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 onErrorLow has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Severity: Minor
                      Found in src/Debug/Framework/Yii2/Module.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