bkdotcom/PHPDebugConsole

View on GitHub

Showing 161 of 181 total issues

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

    protected function dumpObjectProperties(Abstraction $abs)
    {
        $str = '';
        $propHeader = '';
        if (isset($abs['methods']['__get'])) {
Severity: Minor
Found in src/Debug/Dump/TextValue.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 methodTabular has a Cognitive Complexity of 9 (exceeds 5 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 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 toStringCheck has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function toStringCheck(Error $error)
    {
        if (PHP_VERSION_ID >= 70400) {
            return;
        }
Severity: Minor
Found in src/ErrorHandler/AbstractErrorHandler.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 buildInConsole has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    protected function buildInConsole()
    {
        if (!$this->stats['inConsole']) {
            return '';
        }
Severity: Minor
Found in src/Debug/Route/Html/ErrorSummary.php - About 45 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 buildAssetOutput has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private function buildAssetOutput(array $assets)
    {
        $return = '';
        foreach ($assets as $asset) {
            if (\preg_match('#[\r\n]#', $asset)) {
Severity: Minor
Found in src/Debug/Route/Html.php - About 45 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 groupUpdate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function groupUpdate ($group) {
  var selector = '> i:last-child'
  var $toggle = $group.find('> .group-header')
  var haveVis = $group.find('> .group-body > *').filter(function () {
    /*
Severity: Minor
Found in src/Debug/js_src/expandCollapse.js - About 45 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 determineIcon has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function determineIcon ($node) {
  var $icon
  var $node2
  var selector
  if ($node.data('icon')) {
Severity: Minor
Found in src/Debug/js_src/enhanceEntries.js - About 45 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 logParams has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    protected function logParams()
    {
        if (!$this->params) {
            return;
        }
Severity: Minor
Found in src/Debug/Collector/StatementInfo.php - About 45 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 processSubsCallback has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private function processSubsCallback($matches)
    {
        $index = ++$this->subInfo['index'];
        $replace = $matches[0];
        if (\array_key_exists($index, $this->subInfo['args']) === false) {
Severity: Minor
Found in src/Debug/Dump/Substitution.php - About 45 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 clearSummary has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private function clearSummary($flags)
    {
        $return = null;
        $clearErrors = (bool) ($flags & Debug::CLEAR_SUMMARY_ERRORS);
        if ($flags & Debug::CLEAR_SUMMARY) {
Severity: Minor
Found in src/Debug/Method/Clear.php - About 45 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 colKeysMerge has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private static function colKeysMerge($curRowKeys, $colKeys)
    {
        $newKeys = array();
        $count = \count($curRowKeys);
        for ($i = 0; $i < $count; $i++) {
Severity: Minor
Found in src/Debug/Method/Table.php - About 45 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 addConstantsReflection has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private function addConstantsReflection(ReflectionClass $reflector)
    {
        foreach ($reflector->getReflectionConstants() as $refConstant) {
            $name = $refConstant->getName();
            if (isset($this->constants[$name])) {
Severity: Minor
Found in src/Debug/Abstraction/AbstractObjectConstants.php - About 45 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

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function __construct(Debug $subject, $method, $args = array(), $meta = array(), $defaultArgs = array(), $argsToMeta = array())
Severity: Minor
Found in src/Debug/LogEntry.php - About 45 mins to fix

    Function getSubscribers has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getSubscribers($eventName = null)
        {
            if ($eventName !== null) {
                if (!isset($this->subscribers[$eventName])) {
                    return array();
    Severity: Minor
    Found in src/PubSub/Manager.php - About 45 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

    Method errorFactory has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected function errorFactory(self $handler, $errType, $errMsg, $file, $line, $vars = array())
    Severity: Minor
    Found in src/ErrorHandler/ErrorHandler.php - About 45 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

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

            public function __construct($consumerKey, $consumerSecret, $signatureMethod = OAUTH_SIG_METHOD_HMACSHA1, $authType = OAUTH_AUTH_TYPE_AUTHORIZATION, $debug = null)
        Severity: Minor
        Found in src/Debug/Collector/OAuth.php - About 35 mins to fix

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

          function buildChannelLi (channelName, value, isChecked, isRoot, options) {
          Severity: Minor
          Found in src/Debug/js_src/enhanceMain.js - About 35 mins to fix

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

                public function markupIdentifier($val, $asFunction = false, $tagName = 'span', $attribs = array(), $wbr = false)
            Severity: Minor
            Found in src/Debug/Dump/Html/Value.php - About 35 mins to fix

              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
                Severity
                Category
                Status
                Source
                Language