Showing 153 of 170 total issues
Function tabValuesFinish
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function tabValuesFinish($vals, Abstraction $abs)
{
switch ($abs['typeMore']) {
case Type::TYPE_STRING_BASE64:
$vals['labelRaw'] = 'base64';
- 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 getReflectorFromString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function getReflectorFromString($string)
{
$matches = array();
\preg_match(self::$regex, $string, $matches);
$defaults = \array_fill_keys(array('class', 'constant', 'property', 'method', 'function'), 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 expand
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function expand ($node) {
var icon = config.iconsExpand.collapse
var isToggle = $node.is('[data-toggle]')
var what = isToggle
? $node.data('toggle')
- 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 getPhpDocVar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPhpDocVar(Reflector $reflector, $fullyQualifyType = false)
{
/** @psalm-suppress NoInterfaceProperties */
$name = $reflector->name;
$phpDoc = $this->getPhpDoc($reflector, $fullyQualifyType);
- 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 debugEnhance
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
$.fn.debugEnhance = function (method, arg1, arg2) {
// console.warn('debugEnhance', method, this)
if (method === 'sidebar') {
debugEnhanceSidebar(this, arg1)
} else if (method === 'buildChannelList') {
- 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 reduceDataSummary
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function reduceDataSummary()
{
/*
Remove non-essential summary entries
*/
- 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 recordTokenArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function recordTokenArray($token) // phpcs:ignore Generic.Metrics.CyclomaticComplexity
{
switch (self::$record) {
case 'namespace':
switch ($token[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 curlMultiInfoRead
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function curlMultiInfoRead()
{
while ($done = \curl_multi_info_read($this->multiHandle)) {
if ($done['msg'] !== CURLMSG_DONE) {
// if it's not done, then it would be premature to remove the handle.
- 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 cancel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function cancel()
{
if ($this->state !== self::PENDING) {
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 xdebugFix
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function xdebugFix(array $stack)
{
$count = \count($stack);
for ($i = 0; $i < $count; $i++) {
$frame = \array_merge(array(
- 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 test4byteSeq
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function test4byteSeq()
{
$bytes = $this->getBytes(4);
if (\count($bytes) !== 4) {
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 getReflector
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getReflector($mixed, $returnSelf = false)
{
if ($mixed instanceof Reflector && $returnSelf) {
return $mixed;
}
- 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 inferContentType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function inferContentType(MessageInterface $message, $body)
{
$contentType = $message->getHeaderLine('Content-Type');
if ($contentType) {
return $contentType;
- 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 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 compare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function compare (a, b, collator) {
var comp = 0
if (afloat && bfloat) {
if (a < b) {
comp = -1
- 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 sortData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function sortData(array $array)
{
$sortVisOrder = array('public', 'magic', 'magic-read', 'magic-write', 'protected', 'private', 'debug');
$sortData = array(
'name' => array(),
- 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 autoArgs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function autoArgs($caller = array())
{
$args = array();
if (isset($caller['function']) === false) {
return $args;
- 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(Abstraction $abs)
{
$str = '<dt>phpDoc</dt>' . "\n";
foreach ($abs['phpDoc'] as $tagName => $values) {
if (\is_array($values) === 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"