1 | <?php |
||
10 | class AdminareaPolicy |
||
11 | { |
||
12 | use HandlesAuthorization; |
||
13 | |||
14 | /** |
||
15 | * Determine whether the user can access the adminarea. |
||
16 | * |
||
17 | * @param string $ability |
||
18 | * @param \Rinvex\Fort\Contracts\UserContract $user |
||
19 | * |
||
20 | * @return bool |
||
21 | */ |
||
22 | public function access($ability, UserContract $user) |
||
26 | } |
||
27 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: