| Total Complexity | 12 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | trait CheckWhere{ |
||
| 8 | |||
| 9 | protected function checkWhereParam($data) |
||
| 10 | { |
||
| 11 | if(count($data) === 0){ |
||
| 12 | throw new Exception('It is necessary to define a condition to be tested.'); |
||
| 13 | } |
||
| 14 | } |
||
| 15 | |||
| 16 | protected function checkExistParam($param, $data) |
||
| 17 | { |
||
| 18 | if(!array_key_exists($param,$data)){ |
||
| 19 | throw new Exception('Test parameter not available on the route in question.'); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 23 | protected function checkWhereParams($params) |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | protected function checkWhere($route, $request): bool |
||
| 52 | } |
||
| 53 | |||
| 55 |