Showing 14 of 16 total issues
Function __construct
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($field, $rawValue)
{
if (!is_string($field)) {
throw new InvalidExprException('The value of "field" must be a string data 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 __construct
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($field, $rawValue)
{
if (!is_string($field)) {
throw new InvalidExprException('The value of "field" must be a string data type.');
}
Function parse
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function parse()
{
$builder = new ExprBuilder();
$items = $this->getData();
- 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 process
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(ExprBuilder $builder, $field, $expression, $value)
{
if (!Expr::isValidExpression($expression)) {
throw new ParserException(sprintf(
'The expression "%s" is not allowed or not exists.',
Function __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($expressions)
{
if (!is_string($expressions) && !is_array($expressions)) {
throw new InvalidExprException('The value of "expressions" must not be a string or an array data 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 parse
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse()
{
$builder = new ExprBuilder();
$queryString = $this->getData()->getUri()->getQuery();
Method __construct
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($expressions)
{
if (!is_string($expressions) && !is_array($expressions)) {
throw new InvalidExprException('The value of "expressions" must not be a string or an array data type.');
}
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($currentPageNumber, $maxResultsPerPage)
{
if (!is_int($currentPageNumber) && !is_numeric($currentPageNumber)) {
throw new InvalidExprException('The value of "currentPageNumber" must be an int data type.');
}
Method parse
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse()
{
$builder = new ExprBuilder();
$items = $this->getData();
Function parse
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function parse()
{
$builder = new ExprBuilder();
$queryString = $this->getData()->getUri()->getQuery();
- 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 __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($currentPageNumber, $maxResultsPerPage)
{
if (!is_int($currentPageNumber) && !is_numeric($currentPageNumber)) {
throw new InvalidExprException('The value of "currentPageNumber" must be an int data 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
Function parse
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function parse()
{
$builder = new ExprBuilder();
$items = explode($this->getSeparator(), $this->getData());
- 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 process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function process(ExprQueue $queue)
{
foreach ($queue as $expr) {
if ($expr instanceof BetweenExpr) {
$this->processBetweenExpr($expr);
- 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 __construct
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($field, $from, $to)
{
if (!is_string($field)) {
throw new InvalidExprException('The value of "field" must be a string data 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"