Showing 2,200 of 2,231 total issues
Function createFileLink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function createFileLink (string, remove, foundFiles) {
var $replace
var $string = $(string)
var attrs = string.attributes // attrs is not a plain object, but an array of attribute nodes
// which contain both the name and value
- 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 enhanceEntryDefault
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function enhanceEntryDefault ($entry) {
// regular log-type entry
var title
if ($entry.data('file')) {
if (!$entry.attr('title')) {
- 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 searchRecursiveWalk
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function searchRecursiveWalk($search, array $array, $byKey)
{
foreach ($array as $key => $val) {
if (\is_array($val) === false) {
continue;
- 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 addPlugin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function addPlugin($plugin, $name = null)
{
$this->assertPlugin($plugin);
if ($this->hasPlugin($plugin)) {
return $this->debug;
- 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 dump
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function dump(ObjectAbstraction $abs)
{
$className = $this->dumpClassName($abs);
if ($abs['isRecursion']) {
return $className . "\n" . '<span class="t_recursion">*RECURSION*</span>';
- 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 onImportObj
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function onImportObj($absValues)
{
if (isset($absValues['collectMethods'])) {
if ($absValues['collectMethods'] === false) {
$absValues['cfgFlags'] &= ~AbstractObject::METHOD_COLLECT;
- 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 getOption
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getOption($path)
{
$path = \is_array($path)
? $path
: \array_filter(\preg_split('#[\./]#', (string) $path), 'strlen');
- 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 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']);
- 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 onSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function onSet($values = array())
{
if ($this->values['type'] === Type::TYPE_CONST && $this->getValue('name') !== null) {
\trigger_error('Deprecated: TYPE_CONST', \E_USER_DEPRECATED);
$this->values['type'] = Type::TYPE_IDENTIFIER;
- 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 doPublish
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function doPublish($eventName, $subscribers, Event $event)
{
$this->subscriberStack[] = array(
'eventName' => $eventName,
'subscribers' => $subscribers,
- 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
Prefer single quoted strings Open
@import "methods";
- Exclude checks
Prefer single quoted strings Open
@import "drawer";
- Exclude checks
Rule declaration should be followed by an empty line Open
}
- Exclude checks
Avoid qualifying class selectors with an element. Open
li.php-shutdown {
- Exclude checks
Prefer single quoted strings Open
@import "optionsDropdown";
- Exclude checks
Rule declaration should be preceded by an empty line Open
&:hover {
- Exclude checks
Prefer single quoted strings Open
@import "base";
- Exclude checks
Use //
comments everywhere Open
/*
- Exclude checks
Properties should be ordered border-bottom, display Open
display: block;
- Exclude checks