1 | <?php namespace Anomaly\UsersModule\Http\Middleware; |
||
20 | class CheckSecurity |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * The Guard implementation. |
||
25 | * |
||
26 | * @var Guard |
||
27 | */ |
||
28 | protected $guard; |
||
29 | |||
30 | /** |
||
31 | * The security utility. |
||
32 | * |
||
33 | * @var UserSecurity |
||
34 | */ |
||
35 | protected $security; |
||
36 | |||
37 | /** |
||
38 | * The response factory. |
||
39 | * |
||
40 | * @var ResponseFactory |
||
41 | */ |
||
42 | protected $response; |
||
43 | |||
44 | /** |
||
45 | * The redirector utility. |
||
46 | * |
||
47 | * @var Redirector |
||
48 | */ |
||
49 | protected $redirect; |
||
50 | |||
51 | /** |
||
52 | * Create a new CheckSecurityRequest instance. |
||
53 | * |
||
54 | * @param Guard $guard |
||
55 | * @param Redirector $redirect |
||
56 | * @param ResponseFactory $response |
||
57 | * @param UserSecurity $security |
||
58 | */ |
||
59 | public function __construct( |
||
60 | Guard $guard, |
||
61 | Redirector $redirect, |
||
62 | ResponseFactory $response, |
||
63 | UserSecurity $security |
||
64 | ) { |
||
65 | $this->guard = $guard; |
||
66 | $this->redirect = $redirect; |
||
67 | $this->response = $response; |
||
68 | $this->security = $security; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * Handle an incoming request. |
||
73 | * |
||
74 | * @param \Illuminate\Http\Request $request |
||
75 | * @param \Closure $next |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function handle(Request $request, Closure $next) |
||
88 | } |
||
89 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.