Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class TernaryExpression extends Expression implements ExpressionInterface |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $predicates = []; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $then = ''; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected $else = ''; |
||
17 | |||
18 | /** |
||
19 | * Create predicate expression. |
||
20 | * |
||
21 | * @param string $predicates |
||
22 | * @param string $then |
||
23 | * @param string $else |
||
24 | */ |
||
25 | 1 | public function __construct($predicates, $then, $else = null) |
|
26 | { |
||
27 | 1 | $this->predicates = $predicates; |
|
28 | 1 | $this->then = $then; |
|
29 | 1 | $this->else = $else; |
|
30 | 1 | } |
|
31 | |||
32 | 1 | public function compile(QueryBuilder $queryBuilder): string |
|
41 | } |
||
42 | } |
||
43 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..