# bkdotcom/PHPDebugConsole

### Showing 161 of 181 total issues

#### 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;
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"

#### 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(); Found in src/Debug/Utility/PhpDocBase.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 dumpPhpDoc has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  protected function dumpPhpDoc(Abstraction$abs)
{
$str = '<dt>phpDoc</dt>' . "\n"; foreach ($abs['phpDoc'] as $tagName =>$values) {
if (\is_array($values) === false) { Found in src/Debug/Dump/Html/HtmlObject.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 create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open export function create ($entry, $strings, remove) { var$objects = $entry.find('.t_object > .object-inner > .property.debug-value > .t_identifier').filter(function () { return this.innerText.match(/^file$/)
})
var detectFiles = $entry.data('detectFiles') === true ||$objects.length > 0

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

    private function getPropValue($propInfo, Abstraction$abs, ReflectionProperty $refProperty) {$propName = $refProperty->getName(); if (\array_key_exists($propName, $abs['propertyOverrideValues'])) {$propInfo['valueFrom'] = 'debug';
Found in src/Debug/Abstraction/AbstractObjectProperties.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 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" ### Further reading #### Function buildErrorList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  private function buildErrorList() {$errorStr = '';
$errors =$this->debug->errorHandler->get('errors');
\uasort($errors, function ($err1, $err2) { Found in src/Debug/Route/Email.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 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"

    private function hasSpecial($str) { foreach (self::$special['regex'] as $regex) { if (\preg_match($regex, $str) > 0) { return true; Found in src/Debug/Utility/Utf8Buffer.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 dumpObjectMethods has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open  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"

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

    private function exitCheck()
{
var $replace var$string = $(string) var attrs = string.attributes Found in src/Debug/js_src/FileLinks.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 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 methodGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

    protected function methodGroup(LogEntry $logEntry) {$method = $logEntry['method']; if ($method === 'groupEnd') {
{
$regex = '/^' . '(?P<class>[\w\\\]+)' // classname . '(?:::(?:' Found in src/Debug/Utility/Php.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 tippyContent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open function tippyContent (reference) { var$ref = $(reference) var attributes var title if ($ref.hasClass('fa-hashtag')) {
Found in src/Debug/js_src/Tooltip.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"

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

export function collapse ($node, immediate) { var isToggle =$node.is('[data-toggle]')
var what = isToggle
? $node.data('toggle') :$node.find('> *[data-toggle]').data('toggle')
Found in src/Debug/js_src/expandCollapse.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"

#### 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"

    public function processLogEntry(LogEntry $logEntry) {$method = $logEntry['method'];$args = $logEntry['args'];$this->setFirephpMeta($logEntry); Found in src/Debug/Route/Firephp.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"