Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | trait HasOperatorExpressions |
||
19 | { |
||
20 | /** |
||
21 | * Evaluate a condition |
||
22 | * |
||
23 | * @link https://www.arangodb.com/docs/stable/aql/operators.html#ternary-operator |
||
24 | * |
||
25 | * @param array<mixed>|PredicateExpression $conditions |
||
26 | */ |
||
27 | 1 | public function if( |
|
28 | array|PredicateExpression $conditions, |
||
29 | mixed $then, |
||
30 | mixed $else = null |
||
31 | ): TernaryExpression { |
||
32 | 1 | return new TernaryExpression($conditions, $then, $else); |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Perform an arithmetic operation on two numbers |
||
37 | * |
||
38 | * @link https://www.arangodb.com/docs/stable/aql/operators.html#arithmetic-operators |
||
39 | */ |
||
40 | 3 | public function calc( |
|
46 | } |
||
47 | } |
||
48 |