Showing 66 of 66 total issues
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Method addHavingOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addHavingOperatorCondition($logic, $negate, $field, $operator, $values);
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
Method addOnOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOnOperatorCondition($logic, $negate, $field, $operator, $values)
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values);
Method addInOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addInOperatorCondition($field, $values, $logic, $negate, $containerName)
Method parseIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function parseIn($field, $operator, $value, $negated, $convertMongoId = false)
Method addHavingOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addHavingOperatorCondition($logic, $negate, $field, $operator, $values)
Method addContainerInOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function addContainerInOperatorCondition($field, $values, $logic, $negate, $containerName = null)
Method addOnOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOnOperatorCondition($logic, $negate, $field, $operator, $values);
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values);
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($database, $driver, $config, $fragmentParser, $conditionsParser)
Method addKeyValuesToArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function addKeyValuesToArray($name, $args, $requireKeys = false, $firstParameterIsKey = true, $assertIsNumeric = false)
Method addContainerSubarrayItemPlaceholder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function addContainerSubarrayItemPlaceholder($field, $logic = 'and', $negate = false, $allowEmpty = true, $containerName = null)
Method addInOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addInOperatorCondition($field, $values, $logic, $negate, $containerName)
Function normalize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function normalize($condition, $prefix = null)
{
if($condition instanceof \PHPixie\Database\Type\Document\Conditions\Condition\Collection\Embedded\SubarrayItem) {
$conditions = $condition->conditions();
$parsed = $this->parse($conditions, 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
Avoid too many return
statements within this method. Open
Open
return $this->countQuery($query, $runner);