1 | <?php |
||
21 | class Main |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Module class instance |
||
26 | * @var \gplcart\core\Module $module |
||
27 | */ |
||
28 | protected $module; |
||
29 | |||
30 | /** |
||
31 | * Library class instance |
||
32 | * @var \gplcart\core\Library $library |
||
33 | */ |
||
34 | protected $library; |
||
35 | |||
36 | /** |
||
37 | * @param Module $module |
||
38 | * @param Library $library |
||
39 | */ |
||
40 | public function __construct(Module $module, Library $library) |
||
45 | |||
46 | /** |
||
47 | * Implements hook "library.list" |
||
48 | * @param array $libraries |
||
49 | */ |
||
50 | public function hookLibraryList(array &$libraries) |
||
66 | |||
67 | /** |
||
68 | * Implements hook "route.list" |
||
69 | * @param array $routes |
||
70 | */ |
||
71 | public function hookRouteList(array &$routes) |
||
80 | |||
81 | /** |
||
82 | * Implements hook "module.enable.after" |
||
83 | */ |
||
84 | public function hookModuleEnableAfter() |
||
88 | |||
89 | /** |
||
90 | * Implements hook "module.disable.after" |
||
91 | */ |
||
92 | public function hookModuleDisableAfter() |
||
96 | |||
97 | /** |
||
98 | * Implements hook "module.install.after" |
||
99 | */ |
||
100 | public function hookModuleInstallAfter() |
||
104 | |||
105 | /** |
||
106 | * Implements hook "module.uninstall.after" |
||
107 | */ |
||
108 | public function hookModuleUninstallAfter() |
||
112 | |||
113 | /** |
||
114 | * Add CodeMirror library and extra files |
||
115 | * @param \gplcart\core\Controller $controller |
||
116 | * @throws InvalidArgumentException |
||
117 | * @throws OutOfRangeException |
||
118 | */ |
||
119 | public function addLibrary($controller) |
||
141 | |||
142 | } |
||
143 |
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.