# bkdotcom/PHPDebugConsole

### Showing 155 of 175 total issues

#### Function normalizeArray has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    private function normalizeArray($cfg) {$return = array();
foreach ($cfg as$path => $v) {$ref = &$return; Found in src/Debug/Config.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 methodGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  protected function methodGroup(LogEntry$logEntry)
{
$method =$logEntry['method'];
if ($method === 'groupEnd') { if ($logEntry->getMeta('closesSummary')) {
Found in src/Debug/Dump/Text.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"

#### Function initSkippableTests has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    private static function initSkippableTests($levelMax) { if ($levelMax === null) {
static::$internalClasses['levelCurrent'] = null;$levelMax = \end(static::$internalClasses['levels']); Found in src/Backtrace/SkipInternal.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 closeOpen has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  private function closeOpen() { if ($this->inShutdown) {
return;
Found in src/Debug/Method/Group.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"

#### Function dumpPropVis has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    protected function dumpPropVis($info) {$vis = (array) $info['visibility']; foreach ($vis as $i =>$v) {
if (\in_array($v, array('magic','magic-read','magic-write'), true)) { Found in src/Debug/Dump/BaseValue.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 enhanceValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open export function enhanceValue ($entry, node) {
var $node =$(node)
if ($node.is('.t_array')) { enhanceArray($node)
} else if ($node.is('.t_object')) { Found in src/Debug/js_src/enhanceEntries.js - 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 isExcluded has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  protected function isExcluded($category)
{
foreach ($this->except as$exceptCat) {
//  If found, we skip
if (\trim(\strtolower($exceptCat)) === \trim(\strtolower($category))) {
Found in src/Debug/Framework/Yii1_1/LogRoute.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"

    protected function dumpObjectMethods(Abstraction $abs) {$methodCollect = $abs['cfgFlags'] & AbstractObject::METHOD_COLLECT;$methodOutput = $abs['cfgFlags'] & AbstractObject::METHOD_OUTPUT; if (!$methodCollect || !$methodOutput) { Found in src/Debug/Dump/TextValue.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 dumpString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  protected function dumpString($val, Abstraction $abs = null) {$addQuotes = $this->getDumpOpt('addQuotes'); if (\is_numeric($val)) {
$date =$this->checkTimestamp($val,$abs);
Found in src/Debug/Dump/TextValue.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"

#### Function updateTableInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    private function updateTableInfo($rowKey,$rowValues, $rowInfo) {$this->meta['tableInfo']['haveObjRow'] = $this->meta['tableInfo']['haveObjRow'] ||$rowInfo['class'];
foreach ($this->meta['totalCols'] as$key) {
$this->meta['tableInfo']['columns'][$key]['total'] += $rowValues[$key];
Found in src/Debug/Method/Table.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"

#### Function setRecordInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    private static function setRecordInfo($token) { //$token may not be an array, but that's ok... $token[0] will just be first char of string switch ($token[0]) {
case T_AS:
Found in src/Debug/Utility/UseStatements.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"

    private function prepSubscribers($eventName) { \krsort($this->subscribers[$eventName]);$this->sorted[$eventName] = array(); foreach ($this->subscribers[$eventName] as$priority => $subscribers) { Found in src/PubSub/Manager.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 importGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  private static function importGroup($cat, $data) { foreach ($data as $i =>$val) {
if ($cat !== 'logSummary') {$data[$i] = self::importLogEntry($val);
Found in src/Debug/Utility/SerializeLog.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"

#### Function getParentReflectorMpc has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    private function getParentReflectorMpc(Reflector $reflector,$what)
{
$hasWhat = 'has' . \ucfirst($what);
$getWhat = 'get' . \ucfirst($what);
if ($what === 'constant') { Found in src/Debug/Utility/PhpDocBase.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 serializeGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  private static function serializeGroup($data)
{
foreach ($data as$i => $val) { if (!($val instanceof LogEntry)) {
$data[$i] = static::serializeGroup(\$val);
Found in src/Debug/Utility/SerializeLog.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"