Yeelight /
cloud2
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Yeelight\Http\Requests; |
||
| 4 | |||
| 5 | use Illuminate\Foundation\Http\FormRequest; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Class AdminMenuUpdateRequest |
||
| 9 | * |
||
| 10 | * @category Yeelight |
||
| 11 | * |
||
| 12 | * @package Yeelight\Http\Requests |
||
| 13 | * |
||
| 14 | * @author Sheldon Lee <[email protected]> |
||
| 15 | * |
||
| 16 | * @license https://opensource.org/licenses/MIT MIT |
||
| 17 | * |
||
| 18 | * @link https://www.yeelight.com |
||
| 19 | */ |
||
| 20 | class AdminMenuUpdateRequest extends FormRequest |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Get the URL to redirect to on a validation error. |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | protected function getRedirectUrl() |
||
| 28 | { |
||
| 29 | return $this->getSession()->previousUrl(); |
||
|
0 ignored issues
–
show
|
|||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Determine if the user is authorized to make this request. |
||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function authorize() |
||
| 38 | { |
||
| 39 | return true; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the validation rules that apply to the request. |
||
| 44 | * |
||
| 45 | * @return array |
||
| 46 | */ |
||
| 47 | public function rules() |
||
| 48 | { |
||
| 49 | return [ |
||
| 50 | 'title' => 'required|max:50', |
||
| 51 | 'icon' => 'required|max:50', |
||
| 52 | ]; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.