| 1 | <?php |
||
| 10 | class AccountPasswordRequest extends FormRequest |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Determine if the user is authorized to make this request. |
||
| 14 | * |
||
| 15 | * @throws \Rinvex\Fort\Exceptions\GenericException |
||
| 16 | * |
||
| 17 | * @return bool |
||
| 18 | */ |
||
| 19 | public function authorize(): bool |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the validation rules that apply to the request. |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function rules(): array |
||
| 44 | } |
||
| 45 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: