1 | <?php |
||
9 | abstract class Request extends FormRequest |
||
10 | { |
||
11 | /** |
||
12 | * Determine if the user is authorized to make this request. |
||
13 | * |
||
14 | * @return bool |
||
15 | */ |
||
16 | public function authorize() |
||
20 | |||
21 | /** |
||
22 | * Handle a failed validation attempt. |
||
23 | * |
||
24 | * @param $validator |
||
25 | * |
||
26 | * @return mixed |
||
27 | */ |
||
28 | protected function failedValidation(Validator $validator) |
||
29 | { |
||
30 | flash()->error(trans('validation.failedForm')); |
||
|
|||
31 | |||
32 | parent::failedValidation($validator); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get a parameter of the current route. |
||
37 | * |
||
38 | * @param $key |
||
39 | * |
||
40 | * @return object|string |
||
41 | */ |
||
42 | protected function getRouteParameter($key) |
||
46 | } |
||
47 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.