Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function validateItem(array $values): array |
||
17 | { |
||
18 | $validator = Validator::make($this->values($values), [ |
||
19 | 'reports' => 'required|array', |
||
20 | 'reports.template' => 'required|string|in:default,raptor', |
||
21 | ]); |
||
22 | |||
23 | if($validator->fails()) |
||
24 | { |
||
25 | throw new ValidationException($validator); |
||
26 | } |
||
27 | return $validator->validated(); |
||
28 | } |
||
30 |