These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Elgg autoloader |
||
4 | * Facilities for class/interface/trait autoloading. |
||
5 | * |
||
6 | * @package Elgg.Core |
||
7 | * @subpackage Autoloader |
||
8 | */ |
||
9 | |||
10 | /** |
||
11 | * Get the global service provider |
||
12 | * |
||
13 | * @param \Elgg\Di\ServiceProvider $services Elgg service provider. This must be set by the application. |
||
14 | * @return \Elgg\Di\ServiceProvider |
||
15 | * @access private |
||
16 | */ |
||
17 | function _elgg_services(\Elgg\Di\ServiceProvider $services = null) { |
||
18 | 720 | static $inst; |
|
19 | 720 | if ($services !== null) { |
|
20 | 196 | $inst = $services; |
|
21 | } |
||
22 | 720 | return $inst; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Get the Elgg config service |
||
27 | * |
||
28 | * @return \Elgg\Config |
||
29 | * @access private |
||
30 | */ |
||
31 | function _elgg_config() { |
||
32 | return _elgg_services()->config; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Delete the autoload system cache |
||
37 | * |
||
38 | * @access private |
||
39 | */ |
||
40 | function _elgg_delete_autoload_cache() { |
||
41 | _elgg_services()->autoloadManager->deleteCache(); |
||
42 | } |
||
43 | |||
44 | return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) { |
||
0 ignored issues
–
show
|
|||
45 | $events->registerHandler('upgrade', 'all', '_elgg_delete_autoload_cache', 600); |
||
46 | }; |
||
47 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.