Showing 112 of 143 total issues
Function normalizeEventSubscribers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function normalizeEventSubscribers(SubscriberInterface $interface, $mixed)
{
// test if single subscriber
// ie, 'eventName' => 'method',
// or 'eventName' => array('method'), etc
- Read upRead up
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 postSetCfg
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function postSetCfg($cfg = array(), $prev = array())
{
$debugClass = \get_class($this->debug);
if (!\array_intersect(array('*', $debugClass), $this->cfg['objectsExclude'])) {
$this->cfg['objectsExclude'][] = $debugClass;
- Read upRead up
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 normalizeArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function normalizeArray(array $cfg)
{
$return = array();
foreach ($cfg as $path => $v) {
$ref = &$return;
- Read upRead up
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, static function ($err1, $err2) {
- Read upRead up
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(array $data)
{
foreach ($data as $i => $val) {
if (!($val instanceof LogEntry)) {
$data[$i] = static::serializeGroup($val);
- Read upRead up
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 addIcons
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function addIcons ($node) {
var $caption
var $icon = determineIcon($node)
addIconsMisc($node)
if (!$icon) {
- Read upRead up
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 assertAnyOf
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static function assertAnyOf($val, $tests, $message)
{
foreach ($tests as $callable) {
try {
if ($callable($val) === false) {
- Read upRead up
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 markupTypePart
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function markupTypePart($type)
{
$arrayCount = 0; // how many "[]" at end..
if (\preg_match('/(\[\])+$/', $type, $matches)) {
$strlen = \strlen($matches[0]);
- Read upRead up
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 getNegateFlags
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function getNegateFlags($errorReportingLevel, $allConstants, $eAll, $explicitStrict)
{
$flags = array(
'off' => array(),
'on' => array('E_ALL'),
- Read upRead up
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 garbageCollectionErr
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function garbageCollectionErr($errorStats, $hash, $tsCutoff)
{
if ($errorStats['tsLastOccur'] > $tsCutoff) {
return false;
}
- Read upRead up
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 getFirstIndexRewind
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function getFirstIndexRewind(array $backtrace, $index)
{
$count = \count($backtrace);
if ($index && $index === $count && self::getClass($backtrace[$index - 1]) === null) {
// every frame was skipped and first frame is include, or similar
- Read upRead up
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 6 (exceeds 5 allowed). Consider refactoring. Open
public function sort(array $array, $order = 'visibility, name')
{
$order = \preg_split('/[,\s]+/', (string) $order);
$aliases = array(
'name' => 'name',
- Read upRead up
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 updateTableInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function updateTableInfo($rowKey, array $rowValues, array $rowInfo)
{
$this->meta['tableInfo']['haveObjRow'] = $this->meta['tableInfo']['haveObjRow'] || $rowInfo['class'];
foreach ($this->meta['totalCols'] as $key) {
/**
- Read upRead up
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 applyOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function applyOptions(RequestInterface $request, array $options)
{
$this->assertOptions($options);
foreach ($options['headers'] as $name => $val) {
- Read upRead up
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 logReqRes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function logReqRes($action, $exception = null, $logParsedFault = false)
{
\bdk\Debug\Utility\Php::assertType($exception, 'Exception');
$fault = null;
- Read upRead up
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')) {
- Read upRead up
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 init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function init ($root) {
config = $root.data('config') || $('body').data('config')
options = $root.find('> .tab-panes > .tab-primary').data('options') || {}
if (options.sidebar) {
- Read upRead up
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 normalize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function normalize($backtrace)
{
self::$backtraceTemp = array();
$frameTemp = array(
'class' => null,
- Read upRead up
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 removePlugin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function removePlugin($plugin)
{
if (\is_string($plugin)) {
$plugin = $this->findPluginByName($plugin);
} elseif (\is_object($plugin) === false) {
- Read upRead up
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 6 (exceeds 5 allowed). Consider refactoring. Open
public function processLogEntry(LogEntry $logEntry)
{
$method = $logEntry['method'];
$args = $logEntry['args'];
$this->setFirephpMeta($logEntry);
- Read upRead up
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"