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