1 | <?php |
||
19 | class Install |
||
20 | { |
||
21 | /** |
||
22 | * Translation UI model instance |
||
23 | * @var \gplcart\core\models\Translation $translation |
||
24 | */ |
||
25 | protected $translation; |
||
26 | |||
27 | /** |
||
28 | * Module class instance |
||
29 | * @var \gplcart\core\Module $module |
||
30 | */ |
||
31 | protected $module; |
||
32 | |||
33 | /** |
||
34 | * @param Module $module |
||
35 | * @param TranslationModel $translation |
||
36 | */ |
||
37 | public function __construct(Module $module, TranslationModel $translation) |
||
42 | |||
43 | /** |
||
44 | * Returns an array of modules required for Base installation profile |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getRequiredModules() |
||
51 | |||
52 | /** |
||
53 | * Whether the current distribution contains all the required modules |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function hasAllRequiredModules() |
||
64 | |||
65 | /** |
||
66 | * Install all required modules |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function installModules() |
||
79 | |||
80 | /** |
||
81 | * Returns Module model class instance |
||
82 | * @return \gplcart\core\models\Module |
||
83 | */ |
||
84 | protected function getModuleModel() |
||
88 | |||
89 | /** |
||
90 | * Create demo content using Demo module |
||
91 | * @param integer $store_id |
||
92 | * @param string $handler_id |
||
93 | * @return bool|string |
||
94 | */ |
||
95 | public function createDemo($store_id, $handler_id) |
||
99 | |||
100 | /** |
||
101 | * Returns an array of demo handlers |
||
102 | * @return array |
||
103 | */ |
||
104 | public function getDemoHandlers() |
||
108 | |||
109 | /** |
||
110 | * Returns Demo module instance |
||
111 | * @return \gplcart\modules\demo\Demo |
||
112 | * @throws \RuntimeException |
||
113 | */ |
||
114 | public function getDemoModule() |
||
124 | |||
125 | } |
||
126 |
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.