| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class TernaryExpression extends Expression implements ExpressionInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var PredicateExpression|mixed[] |
||
| 13 | */ |
||
| 14 | protected array|PredicateExpression $predicates = []; |
||
| 15 | |||
| 16 | protected mixed $then = ''; |
||
| 17 | |||
| 18 | protected mixed $else = ''; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array<mixed>|PredicateExpression $predicates |
||
| 22 | * @param mixed $then |
||
| 23 | * @param mixed|null $else |
||
| 24 | */ |
||
| 25 | 1 | public function __construct( |
|
| 26 | array|PredicateExpression $predicates, |
||
| 27 | mixed $then, |
||
| 28 | mixed $else = null |
||
| 29 | ) { |
||
| 30 | 1 | $this->predicates = $predicates; |
|
| 31 | 1 | $this->then = $then; |
|
| 32 | 1 | $this->else = $else; |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | public function compile(QueryBuilder $queryBuilder): string |
|
| 44 | } |
||
| 45 | } |
||
| 46 |