1 | <?php |
||
11 | class Module |
||
12 | { |
||
13 | /** |
||
14 | * @var string $pathName Module's name |
||
15 | */ |
||
16 | protected $pathName = ''; |
||
17 | |||
18 | /** |
||
19 | * @var \BFW\Config $config Config object for this module |
||
20 | */ |
||
21 | protected $config; |
||
22 | |||
23 | /** |
||
24 | * @var \stdClass $installInfos All install informations for this module |
||
25 | */ |
||
26 | protected $installInfos; |
||
27 | |||
28 | /** |
||
29 | * @var \stdClass $loadInfos All informations about the module running |
||
30 | */ |
||
31 | protected $loadInfos; |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | * @var \stdClass $status Load and run status |
||
36 | */ |
||
37 | protected $status; |
||
38 | |||
39 | /** |
||
40 | * Constructor |
||
41 | * Load all informations if $loadModule is true |
||
42 | * |
||
43 | * @param string $pathName Module name |
||
44 | * @param boolean $loadModule (default true) If run load information |
||
45 | */ |
||
46 | public function __construct($pathName, $loadModule = true) |
||
54 | |||
55 | /** |
||
56 | * Load informations about the module |
||
57 | * |
||
58 | * @return void |
||
59 | */ |
||
60 | public function loadModule() |
||
71 | |||
72 | /** |
||
73 | * Get installation informations |
||
74 | * |
||
75 | * @param string $pathName The module name |
||
|
|||
76 | * |
||
77 | * @return \stdClass |
||
78 | */ |
||
79 | public static function installInfos($sourceFiles) |
||
84 | |||
85 | /** |
||
86 | * Get the module's name |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getPathName() |
||
94 | |||
95 | /** |
||
96 | * Get the Config object which have config for this module |
||
97 | * |
||
98 | * @return \BFW\Config |
||
99 | */ |
||
100 | public function getConfig() |
||
104 | |||
105 | /** |
||
106 | * Get the installation informations |
||
107 | * |
||
108 | * @return \stdClass |
||
109 | */ |
||
110 | public function getInstallInfos() |
||
114 | |||
115 | /** |
||
116 | * Get the load informations |
||
117 | * |
||
118 | * @return \stdClass |
||
119 | */ |
||
120 | public function getLoadInfos() |
||
124 | |||
125 | /** |
||
126 | * Get the status object for this module |
||
127 | * |
||
128 | * @return \stdClass |
||
129 | */ |
||
130 | public function getStatus() |
||
134 | |||
135 | /** |
||
136 | * Return the load status |
||
137 | * |
||
138 | * @return boolean |
||
139 | */ |
||
140 | public function isLoaded() |
||
144 | |||
145 | /** |
||
146 | * Return the run status |
||
147 | * |
||
148 | * @return boolean |
||
149 | */ |
||
150 | public function isRun() |
||
154 | |||
155 | /** |
||
156 | * Instantiate the Config object to obtains module's configuration |
||
157 | * |
||
158 | * @return void |
||
159 | */ |
||
160 | public function loadConfig() |
||
169 | |||
170 | /** |
||
171 | * Get load information from json file |
||
172 | * |
||
173 | * @return void |
||
174 | */ |
||
175 | public function loadModuleInfos() |
||
184 | |||
185 | /** |
||
186 | * Read a json file and return datas in json |
||
187 | * |
||
188 | * @param string $jsonFilePath : The path to the file to read |
||
189 | * |
||
190 | * @return mixed Json parsed datas |
||
191 | * |
||
192 | * @throws Exception If the file is not found or for a json parser error |
||
193 | */ |
||
194 | protected static function loadJsonFile($jsonFilePath) |
||
207 | |||
208 | /** |
||
209 | * Get path to the runner file |
||
210 | * |
||
211 | * @return string |
||
212 | * |
||
213 | * @throws Exception If the file not exists |
||
214 | */ |
||
215 | protected function getRunnerFile() |
||
240 | |||
241 | /** |
||
242 | * Run the module in a closure |
||
243 | * |
||
244 | * @return void |
||
245 | */ |
||
246 | public function runModule() |
||
262 | } |
||
263 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.