Showing 179 of 179 total issues
Method visitFunctionCall
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function visitFunctionCall(FunctionCall $functionCall, $indent)
{
$function = $functionCall->function;
$arguments = $functionCall->arguments;
$applicant = $functionCall->applicant;
Method compile
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($input, $filename = null)
{
$this->flags = 0;
if ($filename === null) {
Function getVariableChildFromToken
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function getVariableChildFromToken(Token $token)
{
if ($token->is('.')) {
$this->skip();
$token = $this->next();
- 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 parseFunctionCallChildren
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function parseFunctionCallChildren($function, $applicant = null)
{
$arguments = $this->parseParentheses()->nodes;
$children = [];
- 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 next
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function next()
{
if (!mb_strlen($this->input)) {
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
Each class must be in a file by itself Open
class ExpressionStream
- Exclude checks
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($operator, Value $leftHand, Value $rightHand, array $before = null, array $after = null)
Method visitNodesArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function visitNodesArray($array, $indent, $glue = '', $pattern = null, $options = 0)
Function readInterpolation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function readInterpolation($value)
{
while (strlen($value)) {
preg_match('/^([\s\S]*)(?:(\\\\|\\${)[\s\S]*)?$/U', $value, $match);
- 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 name "ExpressionStream::url_stat" is not in camel caps format Open
public function url_stat($path, $flags)
- Exclude checks
Function parseKeywordStatement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parseKeywordStatement($token)
{
$name = $token->value;
$keyword = new Block($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
Method name "ExpressionStream::stream_open" is not in camel caps format Open
public function stream_open($path)
- Exclude checks
Method name "ExpressionStream::stream_tell" is not in camel caps format Open
public function stream_tell()
- Exclude checks
Method name "ExpressionStream::stream_read" is not in camel caps format Open
public function stream_read($count)
- Exclude checks
Function visitFunctionCall
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function visitFunctionCall(FunctionCall $functionCall, $indent)
{
$function = $functionCall->function;
$arguments = $functionCall->arguments;
$applicant = $functionCall->applicant;
- 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 getInitialValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getInitialValue($token)
{
if ($token->isFunction()) {
return $this->parseFunction();
}
- 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 name "ExpressionStream::stream_set_option" is not in camel caps format Open
public function stream_set_option($option, $arg1, $arg2)
- Exclude checks
Function parseInstructions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parseInstructions($block)
{
$initNext = false;
while ($token = $this->next()) {
- 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 name "ExpressionStream::stream_stat" is not in camel caps format Open
public function stream_stat()
- Exclude checks
Method name "ExpressionStream::stream_eof" is not in camel caps format Open
public function stream_eof()
- Exclude checks