| Conditions | 8 |
| Paths | 8 |
| Total Lines | 19 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 17 |
| CRAP Score | 8 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 2 | protected function compare($value, $expression, $against): bool |
|
| 36 | { |
||
| 37 | 2 | switch ($expression) { |
|
| 38 | 2 | case '<': |
|
| 39 | 1 | return $value < $against; |
|
| 40 | 2 | case '>': |
|
| 41 | 1 | return $value > $against; |
|
| 42 | 2 | case '<=': |
|
| 43 | 1 | return $value <= $against; |
|
| 44 | 2 | case '>=': |
|
| 45 | 1 | return $value >= $against; |
|
| 46 | 2 | case '=': |
|
| 47 | 1 | return $value == $against; |
|
| 48 | 2 | case '!=': |
|
| 49 | 1 | return $value != $against; |
|
| 50 | 2 | case '==': |
|
| 51 | 1 | return $value === $against; |
|
| 52 | default: |
||
| 53 | 1 | throw new TableException('Unrecognized expression sign'); |
|
| 54 | } |
||
| 57 |