1 | <?php |
||
38 | 1 | class Control extends Application\UI\Control |
|
39 | { |
||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $templateFile; |
||
44 | |||
45 | /** |
||
46 | * @var Storage\IStorage |
||
47 | */ |
||
48 | private $storage; |
||
49 | |||
50 | /** |
||
51 | * @var Localization\ITranslator|NULL |
||
52 | */ |
||
53 | private $translator; |
||
54 | |||
55 | /** |
||
56 | * @var bool |
||
57 | */ |
||
58 | private $useTitle = FALSE; |
||
59 | |||
60 | /** |
||
61 | * @var bool |
||
62 | */ |
||
63 | private $useOverlay = FALSE; |
||
64 | |||
65 | /** |
||
66 | * @param Localization\ITranslator|NULL $translator |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function injectTranslator(?Localization\ITranslator $translator = NULL) : void |
||
74 | |||
75 | /** |
||
76 | * @param string|NULL $templateFile |
||
77 | * @param Storage\IStorage $storage |
||
78 | * |
||
79 | * @throws Exceptions\FileNotFoundException |
||
80 | */ |
||
81 | public function __construct( |
||
95 | |||
96 | /** |
||
97 | * @return void |
||
98 | */ |
||
99 | public function enableTitle() : void |
||
103 | |||
104 | /** |
||
105 | * @return void |
||
106 | */ |
||
107 | public function disableTitle() : void |
||
111 | |||
112 | /** |
||
113 | * @return void |
||
114 | */ |
||
115 | public function enableOverlay() : void |
||
119 | |||
120 | /** |
||
121 | * @return void |
||
122 | */ |
||
123 | public function disableOverlay() : void |
||
127 | |||
128 | /** |
||
129 | * Prepare component for rendering |
||
130 | * |
||
131 | * @return void |
||
132 | */ |
||
133 | public function beforeRender() : void |
||
159 | |||
160 | /** |
||
161 | * Render control |
||
162 | * |
||
163 | * @return void |
||
164 | */ |
||
165 | public function render() : void |
||
178 | |||
179 | /** |
||
180 | * Change default control template path |
||
181 | * |
||
182 | * @param string $templateFile |
||
183 | * |
||
184 | * @return void |
||
185 | * |
||
186 | * @throws Exceptions\FileNotFoundException |
||
187 | */ |
||
188 | public function setTemplateFile(string $templateFile) : void |
||
209 | |||
210 | /** |
||
211 | * @param Localization\ITranslator $translator |
||
212 | * |
||
213 | * @return void |
||
214 | */ |
||
215 | public function setTranslator(Localization\ITranslator $translator) : void |
||
219 | |||
220 | /** |
||
221 | * @return Localization\ITranslator|NULL |
||
222 | */ |
||
223 | public function getTranslator() : ?Localization\ITranslator |
||
231 | } |
||
232 |
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.