bkdotcom/PHPDebugConsole

View on GitHub

Showing 161 of 181 total issues

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

    public function bindParam($parameter, &$variable, $dataType = PdoBase::PARAM_STR, $length = null, $driverOptions = null)
Severity: Minor
Found in src/Debug/Collector/Pdo/Statement.php - About 35 mins to fix

    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 sort has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function sort(&$array, $order = 'visibility')
        {
            if (!$array) {
                return;
            }
    Severity: Minor
    Found in src/Debug/Abstraction/AbstractObjectHelper.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 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 isSkippable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        private static function isSkippable($frame, $levelMax)
        {
            $frame = \array_merge(array(
                'class' => null,
                'function' => null,
    Severity: Minor
    Found in src/Backtrace/SkipInternal.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 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

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

    export function expand ($node) {
      var icon = config.iconsExpand.collapse
      var isToggle = $node.is('[data-toggle]')
      var what = isToggle
        ? $node.data('toggle')
    Severity: Minor
    Found in src/Debug/js_src/expandCollapse.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 onStart has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function onStart(Abstraction $abs)
        {
            $obj = $abs->getSubject();
            if ($obj instanceof \DateTime || $obj instanceof \DateTimeImmutable) {
                // check for both DateTime and DateTimeImmutable
    Severity: Minor
    Found in src/Debug/Abstraction/AbstractObject.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 dumpEncodedUpdateVals has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        private function dumpEncodedUpdateVals($vals, Abstraction $abs)
        {
            switch ($abs['typeMore']) {
                case Abstracter::TYPE_STRING_BASE64:
                    $vals['labelDecoded'] = 'decoded';
    Severity: Minor
    Found in src/Debug/Dump/Html/HtmlString.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 addViaRef has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in src/Debug/Abstraction/AbstractObjectProperties.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 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/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 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 getPhpDocVar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getPhpDocVar(Reflector $reflector)
        {
            /** @psalm-suppress NoInterfaceProperties */
            $name = $reflector->name;
            $phpDoc = $this->phpDoc->getParsed($reflector);
    Severity: Minor
    Found in src/Debug/Abstraction/AbstractObjectHelper.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 processLogEntry has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function processLogEntry(LogEntry $logEntry)
        {
            $method = $logEntry['method'];
            if (\in_array($method, array('table', 'trace'), true)) {
                $logEntry->setMeta(array(
    Severity: Minor
    Found in src/Debug/Route/Script.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 buildChannelLis has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    function buildChannelLis (channels, nameRoot, checkedChannels, prepend) {
      var $li
      var $lis = []
      var channel
      var channelName = ''
    Severity: Minor
    Found in src/Debug/js_src/enhanceMain.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 recordTokenArray has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        private static function recordTokenArray($token)
        {
            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 normalizeInterfaceSubscribers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        private function normalizeInterfaceSubscribers($mixed)
        {
            if (\is_string($mixed)) {
                // methodName
                return array(
    Severity: Minor
    Found in src/PubSub/Manager.php - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    Severity
    Category
    Status
    Source
    Language