| 1 | <?php |
||
| 9 | class VerifyPermission |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Guard |
||
| 13 | */ |
||
| 14 | protected $auth; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Create a new filter instance. |
||
| 18 | * |
||
| 19 | * @param Guard $auth |
||
| 20 | */ |
||
| 21 | public function __construct(Guard $auth) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Handle an incoming request. |
||
| 28 | * |
||
| 29 | * @param Request $request |
||
| 30 | * @param \Closure $next |
||
| 31 | * @param int|string $permission |
||
|
|
|||
| 32 | * @return mixed |
||
| 33 | * @throws \Ultraware\Roles\Exceptions\PermissionDeniedException |
||
| 34 | */ |
||
| 35 | public function handle($request, Closure $next, ...$permission) |
||
| 47 | } |
||
| 48 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.