Showing 70 of 839 total issues
Function getCroakBuffer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getCroakBuffer()
{
$packing_method = 'S';
$croak = realpath(dirname(__FILE__) . '/resource/quack.wav');
$handle = fopen($croak, 'rb');
- 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 main
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def main(args):
"""
Entry point
"""
try:
- 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 handleListDefinitions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function handleListDefinitions()
{
$renderer = new CliColorizer();
$context = $this->state('scope')->child;
- 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 _expr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _expr($precedence = 0, $opt = false)
{
$token = $this->reader->lookahead;
$prefix = $this->prefixParseletForToken($token);
- 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
Avoid too many return
statements within this method. Open
return 'xor';
Avoid too many return
statements within this method. Open
return static::tryMatch($context, ['%{']);
Avoid too many return
statements within this method. Open
return $bool;
Avoid too many return
statements within this method. Open
return static::fetch($context, $context->peek);
Avoid too many return
statements within this method. Open
return SymbolDecypher::{$this->peek}($this);
Avoid too many return
statements within this method. Open
return new NumberExpr($content, 'int', 'binary');
Avoid too many return
statements within this method. Open
return new NumberExpr($content, 'double', 'scientific');
Avoid too many return
statements within this method. Open
return $op;
Avoid too many return
statements within this method. Open
return new NumberExpr($content, 'int', 'octal');
Avoid too many return
statements within this method. Open
return $this->scope->getPrimitiveType('Number');
Avoid too many return
statements within this method. Open
return static::tryMatch($context, ['=~']);
Avoid too many return
statements within this method. Open
return static::tryMatch($context, ['&{', '&(']);
Avoid too many return
statements within this method. Open
return static::tryMatch($context, ['#{', '#(']);
Avoid too many return
statements within this method. Open
return $this->regex();
Avoid too many return
statements within this method. Open
return new Token(self::EOF_TYPE);
Avoid too many return
statements within this method. Open
return $bool;