1 | <?php |
||
10 | class PayServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | /** |
||
13 | * Determin is defer. |
||
14 | * |
||
15 | * @var bool |
||
16 | */ |
||
17 | protected $defer = true; |
||
18 | |||
19 | /** |
||
20 | * Boot the service. |
||
21 | * |
||
22 | * @author yansongda <[email protected]> |
||
23 | */ |
||
24 | public function boot() |
||
35 | |||
36 | /** |
||
37 | * Regist the service. |
||
38 | * |
||
39 | * @author yansongda <[email protected]> |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function register() |
||
54 | |||
55 | /** |
||
56 | * Get services. |
||
57 | * |
||
58 | * @author yansongda <[email protected]> |
||
59 | * |
||
60 | * @return array |
||
61 | */ |
||
62 | public function provides() |
||
66 | } |
||
67 |
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.