| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | */ |
||
| 22 | public static function update(array $data, int $id): Validator |
||
|
|
|||
| 23 | { |
||
| 24 | $categories = DiscussCategory::pluckLocked('id'); |
||
| 25 | |||
| 26 | $rules = [ |
||
| 27 | 'title' => 'required|min:5', |
||
| 28 | 'category_id' => [ |
||
| 29 | 'required', |
||
| 30 | 'integer', |
||
| 31 | Rule::in($categories->toArray()) |
||
| 32 | ] |
||
| 33 | ]; |
||
| 34 | |||
| 35 | return FacadeValidator::make($data, $rules); |
||
| 36 | } |
||
| 38 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.