| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function validate($request, array $rules, |
||
| 51 | array $messages = [], array $customAttributes = []) |
||
| 52 | { |
||
| 53 | if($request instanceof Collection) |
||
| 54 | $request = $request->toArray(); |
||
| 55 | |||
| 56 | return $this->getValidationFactory()->make( |
||
| 57 | (array) $request, $rules, $messages, $customAttributes |
||
| 58 | )->validate(); |
||
| 59 | } |
||
| 60 | |||
| 71 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.