Showing 155 of 175 total issues
Function rowComparator
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function rowComparator (col, dir, collator) {
var floatRe = /^([+-]?(?:0|[1-9]\d*)(?:\.\d*)?)(?:[eE]([+-]?\d+))?$/
return function sortFunction (trA, trB) {
var a = trA.cells[col].textContent.trim()
var b = trB.cells[col].textContent.trim()
- 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 resolvePhpDocType
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function resolvePhpDocType($type, Abstraction $abs)
{
if (!$type || !$abs['fullyQualifyPhpDocType']) {
return $type;
}
- 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
Method processlogEntries
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processlogEntries(Event $event)
{
$this->dumper->crateRaw = false;
$this->data = $this->debug->data->get();
$errorStats = $this->debug->errorStats();
Function reduceDataFill
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function reduceDataFill($max, $logBack = array())
{
$indexes = \array_reverse(\array_keys($logBack));
$depth = 0;
$groupOnly = 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
Method doProfile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doProfile(LogEntry $logEntry)
{
$debug = $logEntry->getSubject();
if (!$debug->getCfg('enableProfiling', Debug::CONFIG_DEBUG)) {
$callerInfo = $debug->backtrace->getCallerInfo();
Function enhanceInner
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function enhanceInner ($nodeObj) {
var $inner = $nodeObj.find('> .object-inner')
var accessible = $nodeObj.data('accessible')
var hiddenInterfaces = []
if ($nodeObj.is('.enhanced')) {
Function buildChannelLis
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildChannelLis (channels, nameRoot, checkedChannels, prepend) {
var $li
var $lis = []
var channel
var channelName = ''
Function getFirstIndex
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getFirstIndex($backtrace, $offset, $levelMax = null)
{
$levelMax = self::initSkippableTests($levelMax);
$count = \count($backtrace);
for ($i = 1; $i < $count; $i++) {
- 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 onCfgChannels
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function onCfgChannels($val)
{
$tree = array();
foreach ($val as $name => $config) {
$ref = &$tree;
- 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 addDebugWalk
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function addDebugWalk(Abstraction $abs)
{
$debugInfo = $abs['debugInfo'];
$properties = $abs['properties'];
foreach ($properties as $name => $info) {
- 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 extractTypeFromBody
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected static function extractTypeFromBody($body)
{
$type = '';
$nestingLevel = 0;
for ($i = 0, $iMax = \strlen($body); $i < $iMax; $i++) {
- 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 createFileLinksTrace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createFileLinksTrace ($entry, remove) {
var isUpdate = $entry.find('.file-link').length > 0
if (!isUpdate) {
$entry.find('table thead tr > *:last-child').after('<th></th>')
} else if (remove) {
Function visToggles
has 30 lines of code (exceeds 25 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,
Function set
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Config.prototype.set = function (key, val) {
var lsObj = {}
var setVals = {}
var haveLsKey = false
if (typeof key === 'object') {
Method onRequest
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function onRequest(RequestInterface $request, array $options)
{
$requestInfo = array(
'isAsyncronous' => empty($options[RequestOptions::SYNCHRONOUS]),
'requestId' => \spl_object_hash($request),
Function enhanceGroup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function enhanceGroup ($group) {
// console.log('enhanceGroup', $group[0])
var $toggle = $group.find('> .group-header')
var $target = $toggle.next()
addIcons($group) // custom data-icon
Method getReflectorFromString
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function getReflectorFromString($string)
{
$regex = '/^'
. '(?P<class>[\w\\\]+)' // classname
. '(?:::(?:'
Method process
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($args, $options = array())
{
if (\is_string($args[0]) === false) {
return $args;
}
Method callerInfoBuild
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function callerInfoBuild($backtrace)
{
$return = array(
'class' => null, // where the method is defined
'classCalled' => null, // parent::method()... this will be the parent class
Method processLogEntries
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processLogEntries(Event $event = null)
{
$data = $this->debug->data->get();
foreach ($data['alerts'] as $logEntry) {
$this->processLogEntryViaEvent($logEntry);