1 | <?php |
||
13 | class LoaderHelper |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Get the containers namespace value from the containers config file |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function getContainersNamespace() |
||
25 | |||
26 | /** |
||
27 | * Get the containers names |
||
28 | * |
||
29 | * @return array |
||
30 | */ |
||
31 | public function getContainersNames() |
||
41 | |||
42 | /** |
||
43 | * Get the port folders names |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getPortFoldersNames() |
||
57 | |||
58 | /** |
||
59 | * get containers directories paths |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | public function getContainersPaths() |
||
82 | |||
83 | /** |
||
84 | * @return mixed |
||
85 | */ |
||
86 | public function getPortPaths() |
||
90 | |||
91 | /** |
||
92 | * build and return an object of a class from its file path |
||
93 | * |
||
94 | * @param $filePathName |
||
95 | * |
||
96 | * @return mixed |
||
97 | */ |
||
98 | public function getClassObjectFromFile($filePathName) |
||
106 | |||
107 | /** |
||
108 | * get the full name (name \ namespace) of a class from its file path |
||
109 | * result example: (string) "I\Am\The\Namespace\Of\This\Class" |
||
110 | * |
||
111 | * @param $filePathName |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getClassFullNameFromFile($filePathName) |
||
119 | |||
120 | /** |
||
121 | * get the class namespace form file path using token |
||
122 | * |
||
123 | * @param $filePathName |
||
124 | * |
||
125 | * @return null|string |
||
126 | */ |
||
127 | protected function getClassNamespaceFromFile($filePathName) |
||
158 | |||
159 | /** |
||
160 | * get the class name form file path using token |
||
161 | * |
||
162 | * @param $filePathName |
||
163 | * |
||
164 | * @return mixed |
||
165 | */ |
||
166 | protected function getClassNameFromFile($filePathName) |
||
186 | |||
187 | } |
||
188 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.