bkdotcom/PHPDebugConsole

View on GitHub

Showing 147 of 170 total issues

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

    private function tabValuesFinish($vals, Abstraction $abs)
    {
        switch ($abs['typeMore']) {
            case Type::TYPE_STRING_BASE64:
                $vals['labelRaw'] = 'base64';
Severity: Minor
Found in src/Debug/Dump/Html/HtmlStringEncoded.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function reduceDataSummary()
    {
        /*
            Remove non-essential summary entries
        */
Severity: Minor
Found in src/Debug/Route/ChromeLogger.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    public function getPhpDocVar(Reflector $reflector, $fullyQualifyType = false)
    {
        /** @psalm-suppress NoInterfaceProperties */
        $name = $reflector->name;
        $phpDoc = $this->getPhpDoc($reflector, $fullyQualifyType);
Severity: Minor
Found in src/Debug/Abstraction/Object/Helper.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function logListeners($eventName)
    {
        $listeners = $this->eventDispatcher->getListeners($eventName);
        foreach ($listeners as $i => $listener) {
            if (!($listener instanceof \Closure)) {
Severity: Minor
Found in src/Debug/Framework/Laravel/EventsSubscriber.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

$.fn.debugEnhance = function (method, arg1, arg2) {
  // console.warn('debugEnhance', method, this)
  if (method === 'sidebar') {
    debugEnhanceSidebar(this, arg1)
  } else if (method === 'buildChannelList') {
Severity: Minor
Found in src/Debug/js_src/main.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private static function paramsSplit($paramStr)
    {
        $chars = \str_split($paramStr);
        $depth = 0;
        $params = array();
Severity: Minor
Found in src/Debug/Utility/PhpDoc/ParseMethod.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function logSessionVals($sessionNamePassed)
    {
        $namePrev = null;
        if (session_status() !== PHP_SESSION_ACTIVE) {
            if ($sessionNamePassed === null) {
Severity: Minor
Found in src/Debug/Plugin/LogEnv.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

Config.prototype.updateStorage = function (setVals) {
  var lsObj = http.lsGet(this.config.localStorageKey) || {}
  var haveLsKey = false
  var key = null
  if (setVals.linkFilesTemplateDefault && !lsObj.linkFilesTemplate) {
Severity: Minor
Found in src/Debug/js_src/config.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function clearLogHelper(&$log, $clearErrors = false, $entriesKeep = array())
    {
        $keep = $clearErrors
            ? array()
            : array('error', 'warn');
Severity: Minor
Found in src/Debug/Plugin/Method/Clear.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function curlMultiInfoRead()
    {
        while ($done = \curl_multi_info_read($this->multiHandle)) {
            if ($done['msg'] !== CURLMSG_DONE) {
                // if it's not done, then it would be premature to remove the handle.
Severity: Minor
Found in src/CurlHttpMessage/Handler/CurlMulti.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

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

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    protected function buildFooter()
    {
        $haveTotal = false;
        $cells = array();
        foreach ($this->options['tableInfo']['columns'] as $colInfo) {
Severity: Minor
Found in src/Debug/Dump/Html/Table.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function handleStringToken($token)
    {
        if ($token === '{') {
            $this->depth++;
        } elseif ($token === '}') {
Severity: Minor
Found in src/Debug/Utility/FindExit.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 ord has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static function ord($str, &$offset = 0, &$char = '')
    {
        $code = \ord($str[$offset]);
        $numBytes = 1;
        if ($code < 0x80) {
Severity: Minor
Found in src/Debug/Utility/Utf8Dump.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private function walkBranch($keys, $val)
    {
        while (\is_array($val)) {
            if (\count($val) > 1) {
                break;
Severity: Minor
Found in src/Debug/Utility/FileTree.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    protected function manageQueue()
    {
        $currentTime = \microtime(true);
        foreach ($this->queue as $hash => $curlReqRes) {
            if (\count($this->processing) >= $this->options['maxConcurrent']) {
Severity: Minor
Found in src/CurlHttpMessage/Handler/CurlMulti.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    public function set($path, $value = null)
    {
        if ($path === 'logDest') {
            $this->setLogDest($value);
            return;
Severity: Minor
Found in src/Debug/Data.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private static function recordTokenArray($token) // phpcs:ignore Generic.Metrics.CyclomaticComplexity
    {
        switch (self::$record) {
            case 'namespace':
                switch ($token[0]) {
Severity: Minor
Found in src/Debug/Utility/UseStatements.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    private static function getReflectorFromString($string)
    {
        $matches = array();
        \preg_match(self::$regex, $string, $matches);
        $defaults = \array_fill_keys(array('class', 'constant', 'property', 'method', 'function'), null);
Severity: Minor
Found in src/Debug/Utility/Reflection.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

function visToggles ($inner, accessible) {
  var flags = {
    hasProtected: $inner.children('.protected').not('.magic, .magic-read, .magic-write').length > 0,
    hasPrivate: $inner.children('.private').not('.magic, .magic-read, .magic-write').length > 0,
    hasExcluded: $inner.children('.debuginfo-excluded').hide().length > 0,
Severity: Minor
Found in src/Debug/js_src/enhanceObject.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language