1 | <?php |
||
24 | class Module |
||
25 | { |
||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $name; |
||
30 | |||
31 | /** |
||
32 | * @var ModuleFile |
||
33 | */ |
||
34 | private $moduleFile; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $installPath; |
||
40 | |||
41 | /** |
||
42 | * @var InstallInfo |
||
43 | */ |
||
44 | private $installInfo; |
||
45 | |||
46 | /** |
||
47 | * @var int |
||
48 | */ |
||
49 | private $state; |
||
50 | |||
51 | /** |
||
52 | * @var Exception[] |
||
53 | */ |
||
54 | private $loadErrors; |
||
55 | |||
56 | /** |
||
57 | * Creates a new module. |
||
58 | * |
||
59 | * @param ModuleFile|null $moduleFile The module file or `null` if the |
||
60 | * module file could not be loaded. |
||
61 | * @param string $installPath The absolute install path. |
||
62 | * @param InstallInfo|null $installInfo The install info of this module. |
||
63 | * @param Exception[] $loadErrors The errors that happened during |
||
64 | * loading of the module, if any. |
||
65 | */ |
||
66 | 436 | public function __construct(ModuleFile $moduleFile = null, $installPath, InstallInfo $installInfo = null, array $loadErrors = array()) |
|
98 | |||
99 | /** |
||
100 | * Returns the name of the module. |
||
101 | * |
||
102 | * @return string The name of the module. |
||
103 | */ |
||
104 | 376 | public function getName() |
|
108 | |||
109 | /** |
||
110 | * Returns the absolute path at which the module is installed. |
||
111 | * |
||
112 | * @return string The absolute install path of the module. |
||
113 | */ |
||
114 | 99 | public function getInstallPath() |
|
118 | |||
119 | /** |
||
120 | * Returns the module file of the module. |
||
121 | * |
||
122 | * @return ModuleFile|null The module file or `null` if the file could not |
||
123 | * be loaded. |
||
124 | */ |
||
125 | 270 | public function getModuleFile() |
|
129 | |||
130 | /** |
||
131 | * Returns the module's install info. |
||
132 | * |
||
133 | * @return InstallInfo The install info. |
||
134 | */ |
||
135 | 27 | public function getInstallInfo() |
|
139 | |||
140 | /** |
||
141 | * Returns the error that occurred during loading of the module. |
||
142 | * |
||
143 | * @return Exception[] The errors or an empty array if the module was |
||
144 | * loaded successfully. |
||
145 | */ |
||
146 | 11 | public function getLoadErrors() |
|
150 | |||
151 | /** |
||
152 | * Returns the state of the module. |
||
153 | * |
||
154 | * @return int One of the {@link ModuleState} constants. |
||
155 | */ |
||
156 | 3 | public function getState() |
|
160 | |||
161 | /** |
||
162 | * Returns whether the module is enabled. |
||
163 | * |
||
164 | * @return bool Returns `true` if the state is {@link ModuleState::ENABLED}. |
||
165 | * |
||
166 | * @see ModuleState::ENABLED |
||
167 | */ |
||
168 | 5 | public function isEnabled() |
|
172 | |||
173 | /** |
||
174 | * Returns whether the module was not found. |
||
175 | * |
||
176 | * @return bool Returns `true` if the state is {@link ModuleState::NOT_FOUND}. |
||
177 | * |
||
178 | * @see ModuleState::NOT_FOUND |
||
179 | */ |
||
180 | 1 | public function isNotFound() |
|
184 | |||
185 | /** |
||
186 | * Returns whether the module was not loadable. |
||
187 | * |
||
188 | * @return bool Returns `true` if the state is {@link ModuleState::NOT_LOADABLE}. |
||
189 | * |
||
190 | * @see ModuleState::NOT_LOADABLE |
||
191 | */ |
||
192 | 3 | public function isNotLoadable() |
|
196 | |||
197 | /** |
||
198 | * Returns the default name of a module. |
||
199 | */ |
||
200 | 72 | protected function getDefaultName() |
|
204 | } |
||
205 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.