YetiForceCompany/YetiForceCRM

View on GitHub
app/Debuger.php

Summary

Maintainability
C
1 day
Test Coverage
F
55%

Function getBacktrace has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
    {
        $trace = '';
        foreach (debug_backtrace() as $k => $v) {
            if ($k < $minLevel) {
Severity: Minor
Found in app/Debuger.php - About 6 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

Method getBacktrace has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
    {
        $trace = '';
        foreach (debug_backtrace() as $k => $v) {
            if ($k < $minLevel) {
Severity: Minor
Found in app/Debuger.php - About 1 hr to fix

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

        public static function init()
        {
            $targets = [];
            if (\App\Config::debug('LOG_TO_FILE')) {
                $levels = \App\Config::debug('LOG_LEVELS');
    Severity: Minor
    Found in app/Debuger.php - About 1 hr to fix

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

          public static function consoleIsActive()
          {
              $ips = \Config\Debug::$DEBUG_CONSOLE_ALLOWED_IPS;
              if (false === $ips || (\is_string($ips) && RequestUtil::getRemoteIP(true) === $ips) || (\is_array($ips) && \in_array(RequestUtil::getRemoteIP(true), $ips))) {
                  if (\Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS && !\in_array(\App\User::getCurrentUserRealId(), \Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS)) {
      Severity: Minor
      Found in app/Debuger.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 initConsole has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function initConsole()
          {
              if (\App\Config::debug('DISPLAY_DEBUG_CONSOLE') && static::consoleIsActive()) {
                  $debugbar = new Debug\DebugBar\DebugBar();
                  $debugbar->addCollector(new DataCollector\PhpInfoCollector());
      Severity: Minor
      Found in app/Debuger.php - About 25 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 init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function init()
          {
              $targets = [];
              if (\App\Config::debug('LOG_TO_FILE')) {
                  $levels = \App\Config::debug('LOG_LEVELS');
      Severity: Minor
      Found in app/Debuger.php - About 25 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

      The method getBacktrace() has an NPath complexity of 289. The configured NPath complexity threshold is 200.
      Open

          public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
          {
              $trace = '';
              foreach (debug_backtrace() as $k => $v) {
                  if ($k < $minLevel) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      NPathComplexity

      Since: 0.1

      The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

      Example

      class Foo {
          function bar() {
              // lots of complicated code
          }
      }

      Source https://phpmd.org/rules/codesize.html#npathcomplexity

      The method getBacktrace() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10.
      Open

          public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
          {
              $trace = '';
              foreach (debug_backtrace() as $k => $v) {
                  if ($k < $minLevel) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      CyclomaticComplexity

      Since: 0.1

      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

      Example

      // Cyclomatic Complexity = 11
      class Foo {
      1   public function example() {
      2       if ($a == $b) {
      3           if ($a1 == $b1) {
                      fiddle();
      4           } elseif ($a2 == $b2) {
                      fiddle();
                  } else {
                      fiddle();
                  }
      5       } elseif ($c == $d) {
      6           while ($c == $d) {
                      fiddle();
                  }
      7        } elseif ($e == $f) {
      8           for ($n = 0; $n < $h; $n++) {
                      fiddle();
                  }
              } else {
                  switch ($z) {
      9               case 1:
                          fiddle();
                          break;
      10              case 2:
                          fiddle();
                          break;
      11              case 3:
                          fiddle();
                          break;
                      default:
                          fiddle();
                          break;
                  }
              }
          }
      }

      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

      Refactor this function to reduce its Cognitive Complexity from 40 to the 15 allowed.
      Open

          public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
      Severity: Critical
      Found in app/Debuger.php by sonar-php

      Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

      See

      The class Debuger has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.
      Open

      class Debuger
      {
          /**
           * @var \DebugBar\Debuger
           */
      Severity: Minor
      Found in app/Debuger.php by phpmd

      CouplingBetweenObjects

      Since: 1.1.0

      A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

      Example

      class Foo {
          /**
           * @var \foo\bar\X
           */
          private $x = null;
      
          /**
           * @var \foo\bar\Y
           */
          private $y = null;
      
          /**
           * @var \foo\bar\Z
           */
          private $z = null;
      
          public function setFoo(\Foo $foo) {}
          public function setBar(\Bar $bar) {}
          public function setBaz(\Baz $baz) {}
      
          /**
           * @return \SplObjectStorage
           * @throws \OutOfRangeException
           * @throws \InvalidArgumentException
           * @throws \ErrorException
           */
          public function process(\Iterator $it) {}
      
          // ...
      }

      Source https://phpmd.org/rules/design.html#couplingbetweenobjects

      Missing class import via use statement (line '44', column '33').
      Open

                      $debugbar->addCollector(new \DebugBar\DataCollector\ConfigCollector([
      Severity: Minor
      Found in app/Debuger.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'performance' => \App\Config::performance(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\Yii' in method 'init'.
      Open

              \Yii::createObject([
                  'class' => 'yii\log\Dispatcher',
                  'traceLevel' => \App\Config::debug('LOG_TRACE_LEVEL'),
                  'targets' => $targets,
              ]);
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\User' in method 'consoleIsActive'.
      Open

                  if (\Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS && !\in_array(\App\User::getCurrentUserRealId(), \Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS)) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'relation' => \App\Config::relation(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

              if (\App\Config::debug('DISPLAY_DEBUG_CONSOLE') && static::consoleIsActive()) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'App\RequestUtil' in method 'consoleIsActive'.
      Open

              if (false === $ips || (\is_string($ips) && RequestUtil::getRemoteIP(true) === $ips) || (\is_array($ips) && \in_array(RequestUtil::getRemoteIP(true), $ips))) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'App\RequestUtil' in method 'consoleIsActive'.
      Open

              if (false === $ips || (\is_string($ips) && RequestUtil::getRemoteIP(true) === $ips) || (\is_array($ips) && \in_array(RequestUtil::getRemoteIP(true), $ips))) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'init'.
      Open

                  $levels = \App\Config::debug('LOG_LEVELS');
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'debug' => \App\Config::debug(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'init'.
      Open

              if (\App\Config::debug('LOG_TO_FILE')) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'security' => \App\Config::security(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'api' => \App\Config::api(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                  if (\App\Config::debug('DISPLAY_LOGS_IN_CONSOLE')) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'init'.
      Open

                  $levels = \App\Config::debug('LOG_LEVELS');
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'init'.
      Open

                  'traceLevel' => \App\Config::debug('LOG_TRACE_LEVEL'),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                  if (\App\Config::debug('DISPLAY_CONFIG_IN_CONSOLE')) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'search' => \App\Config::search(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'developer' => \App\Config::developer(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'init'.
      Open

              if (\App\Config::debug('LOG_TO_PROFILE')) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'initConsole'.
      Open

                          'sounds' => \App\Config::sounds(),
      Severity: Minor
      Found in app/Debuger.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Define a constant instead of duplicating this literal "class" 5 times.
      Open

                      'class' => 'App\Log\FileTarget',
      Severity: Critical
      Found in app/Debuger.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Return type of initConsole() is undeclared type \App\DebugBar\Debuger (Did you mean class \App\Debuger)
      Open

          public static function initConsole()
      Severity: Minor
      Found in app/Debuger.php by phan

      Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
      Open

                  if (\Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS && !\in_array(\App\User::getCurrentUserRealId(), \Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS)) {
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\requestdatacollector
      Open

                  $debugbar->addCollector(new DataCollector\RequestDataCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\ConfigCollector
      Open

                      $debugbar->addCollector(new \DebugBar\DataCollector\ConfigCollector([
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                      $debugbar->addCollector(new Debug\DebugBarLogs());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\memorycollector
      Open

                  $debugbar->addCollector(new DataCollector\MemoryCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Static call to undeclared method \Yii::createObject
      Open

              \Yii::createObject([
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\phpinfocollector
      Open

                  $debugbar->addCollector(new DataCollector\PhpInfoCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                  $debugbar->addCollector(new DataCollector\PhpInfoCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                  $debugbar->addCollector(new DataCollector\ExceptionsCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                  $debugbar->addCollector(new DataCollector\TimeDataCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Assigning \App\Debug\DebugBar\DebugBar to property but \App\Debuger::$debugBar is \DebugBar\Debuger
      Open

                  static::$debugBar = $debugbar;
      Severity: Minor
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                  $debugbar->addCollector(new DataCollector\RequestDataCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Property \App\Debuger::$debugBar has undeclared type \DebugBar\Debuger (Did you mean class \App\Debuger)
      Open

          protected static $debugBar;
      Severity: Minor
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                  $debugbar->addCollector(new DataCollector\MemoryCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\timedatacollector
      Open

                  $debugbar->addCollector(new DataCollector\TimeDataCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Returning type \DebugBar\Debuger but getDebugBar() is declared to return \App\Debug\DebugBar\DebugBar
      Open

              return static::$debugBar;
      Severity: Minor
      Found in app/Debuger.php by phan

      Suspicious array access to \DebugBar\Debuger
      Open

                  static::$debugBar['logs']->addMessage($message, $level, $traces);
      Severity: Minor
      Found in app/Debuger.php by phan

      Call to method __construct from undeclared class \DebugBar\DataCollector\exceptionscollector
      Open

                  $debugbar->addCollector(new DataCollector\ExceptionsCollector());
      Severity: Critical
      Found in app/Debuger.php by phan

      Call to undeclared method \App\Debug\DebugBar\DebugBar::addCollector
      Open

                      $debugbar->addCollector(new \DebugBar\DataCollector\ConfigCollector([
      Severity: Critical
      Found in app/Debuger.php by phan

      Method \App\Debuger::initConsole is declared to return \App\DebugBar\Debuger but has no return value
      Open

          public static function initConsole()
      Severity: Minor
      Found in app/Debuger.php by phan

      Avoid variables with short names like $l. Configured minimum length is 3.
      Open

                  $l = $k - $minLevel;
      Severity: Minor
      Found in app/Debuger.php by phpmd

      ShortVariable

      Since: 0.2

      Detects when a field, local, or parameter has a very short name.

      Example

      class Something {
          private $q = 15; // VIOLATION - Field
          public static function main( array $as ) { // VIOLATION - Formal
              $r = 20 + $this->q; // VIOLATION - Local
              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                  $r += $this->q;
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#shortvariable

      Avoid variables with short names like $a. Configured minimum length is 3.
      Open

                              foreach ($arg as &$a) {
      Severity: Minor
      Found in app/Debuger.php by phpmd

      ShortVariable

      Since: 0.2

      Detects when a field, local, or parameter has a very short name.

      Example

      class Something {
          private $q = 15; // VIOLATION - Field
          public static function main( array $as ) { // VIOLATION - Formal
              $r = 20 + $this->q; // VIOLATION - Local
              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                  $r += $this->q;
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#shortvariable

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $debugbar->addCollector(new Debug\DebugBarLogs());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $debugbar->addCollector(new \DebugBar\DataCollector\ConfigCollector([
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Checking is active debugging.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  static::$debugBar = $debugbar;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $target = [
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function addLogs($message, $level, $traces)
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('LOG_TO_FILE')) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              ]);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Line exceeds 120 characters; contains 166 characters
      Open

              if (false === $ips || (\is_string($ips) && RequestUtil::getRemoteIP(true) === $ips) || (\is_array($ips) && \in_array(RequestUtil::getRemoteIP(true), $ips))) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return string
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (isset($v['args'])) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      foreach ($v['args'] as &$arg) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                          $val .= '(' . \get_class($a) . ')';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $trace .= "$sep$l";
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  unset($args, $val, $v, $k, $a);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              return rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $trace), PHP_EOL);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'relation' => \App\Config::relation(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              return static::$debugBar;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function consoleIsActive()
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @param int    $maxLevel
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar->addCollector(new DataCollector\RequestDataCollector());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (\App\Config::debug('DISPLAY_LOGS_IN_CONSOLE')) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'performance' => \App\Config::performance(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (\Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS && !\in_array(\App\User::getCurrentUserRealId(), \Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if ($k < $minLevel) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                  $val = $a;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                  if (\is_array($a) || \is_object($a) || \is_resource($a)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (isset($v['line'])) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function isDebugBar()
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (isset(static::$debugBar['logs'])) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (false === $ips || (\is_string($ips) && RequestUtil::getRemoteIP(true) === $ips) || (\is_array($ips) && \in_array(RequestUtil::getRemoteIP(true), $ips))) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Generates a backtrace.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              foreach (debug_backtrace() as $k => $v) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $args = '';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                  $args .= $val . ',';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $trace .= " {$v['file']}:{$v['line']}";
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Initiating debugging console.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function initConsole()
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar->addCollector(new DataCollector\ExceptionsCollector());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'debug' => \App\Config::debug(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return \App\Debug\DebugBar\DebugBar
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return bool
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          } elseif (\is_array($arg)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'developer' => \App\Config::developer(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              return isset(static::$debugBar);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (false !== $levels) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $target['levels'] = $levels;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('LOG_TO_PROFILE')) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @param int    $minLevel
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $trace .= '  >>  ' . (isset($v['class']) ? $v['class'] . '->' : '') . "{$v['function']}($args)" . PHP_EOL;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      break;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar->addCollector(new DataCollector\MemoryCollector());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  static::$debugBar['logs']->addMessage($message, $level, $traces);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  'class' => 'yii\log\Dispatcher',
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      continue;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $args = rtrim($args, ',');
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function getDebugBar()
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function init()
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (false !== $levels) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $ips = \Config\Debug::$DEBUG_CONSOLE_ALLOWED_IPS;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                      if (\is_object($a)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (0 !== $maxLevel && $l >= $maxLevel) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  'traceLevel' => \App\Config::debug('LOG_TRACE_LEVEL'),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              return false;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public static function getBacktrace($minLevel = 1, $maxLevel = 0, $sep = '#')
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          if (!\is_array($arg) && !\is_object($arg) && !\is_resource($arg)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Line exceeds 120 characters; contains 156 characters
      Open

                  if (\Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS && !\in_array(\App\User::getCurrentUserRealId(), \Config\Debug::$DEBUG_CONSOLE_ALLOWED_USERS)) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  return true;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $targets['file'] = $target;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              \Yii::createObject([
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Checking console is active.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                              $args .= var_export($arg, true);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                      }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      ]));
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Get Debuger instance.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Initiating debugging.
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $targets = [];
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $levels = \App\Config::debug('LOG_LEVELS');
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                              $args = rtrim($args, ',') . ']';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          protected static $debugBar;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return \App\DebugBar\Debuger
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (\App\Config::debug('DISPLAY_CONFIG_IN_CONSOLE')) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'api' => \App\Config::api(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return bool
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      'class' => 'App\Log\Profiling',
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  ];
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $targets['profiling'] = $target;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                                      $val = \gettype($a);
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @var \DebugBar\Debuger
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar->addCollector(new DataCollector\PhpInfoCollector());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar->addCollector(new DataCollector\TimeDataCollector());
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'security' => \App\Config::security(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $levels = \App\Config::debug('LOG_LEVELS');
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  ];
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $target = [
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  'targets' => $targets,
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $trace = '';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                              }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('DISPLAY_DEBUG_CONSOLE') && static::consoleIsActive()) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'search' => \App\Config::search(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          'sounds' => \App\Config::sounds(),
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      'class' => 'App\Log\FileTarget',
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      return false;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $debugbar = new Debug\DebugBar\DebugBar();
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $target['levels'] = $levels;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                              $args .= '[';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      }
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @param string $sep
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $l = $k - $minLevel;
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                              foreach ($arg as &$a) {
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      Spaces must be used to indent lines; tabs are not allowed
      Open

                          $args .= ',';
      Severity: Minor
      Found in app/Debuger.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status