| 1 | <?php |
||
| 9 | class AccountPasswordRequest extends FormRequest |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Determine if the user is authorized to make this request. |
||
| 13 | * |
||
| 14 | * @throws \Cortex\Foundation\Exceptions\GenericException |
||
| 15 | * |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function authorize(): bool |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Configure the validator instance. |
||
| 25 | * |
||
| 26 | * @param \Illuminate\Validation\Validator $validator |
||
| 27 | * |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | public function withValidator($validator): void |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the validation rules that apply to the request. |
||
| 45 | * |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public function rules(): array |
||
| 55 | } |
||
| 56 |
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: