1 | <?php |
||
23 | class Locale |
||
24 | { |
||
25 | /** |
||
26 | * The Guard implementation. |
||
27 | * |
||
28 | * @var Guard |
||
29 | */ |
||
30 | protected $auth; |
||
31 | |||
32 | /** |
||
33 | * Create a new filter instance. |
||
34 | * |
||
35 | * @param Guard $auth |
||
36 | */ |
||
37 | 59 | public function __construct(Guard $auth) |
|
41 | |||
42 | /** |
||
43 | * Handle an incoming request. |
||
44 | * |
||
45 | * @param Request $request |
||
46 | * @param \Closure $next |
||
47 | * |
||
48 | * @return mixed |
||
49 | */ |
||
50 | 59 | public function handle(Request $request, Closure $next) |
|
58 | } |
||
59 |
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: