Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ScriptsHelper |
||
9 | { |
||
10 | /** |
||
11 | * Handle the post-install Composer event. |
||
12 | * |
||
13 | * @param Event $event |
||
14 | * @return void |
||
15 | */ |
||
16 | public static function postInstall(Event $event) |
||
17 | { |
||
18 | require_once $event->getComposer()->getConfig()->get('vendor-dir') . '/autoload.php'; |
||
19 | static::clearCompiled(); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Handle the post-update Composer event. |
||
24 | * |
||
25 | * @param Event $event |
||
26 | * @return void |
||
27 | */ |
||
28 | public static function postUpdate(Event $event) |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Handle the post-autoload-dump Composer event. |
||
36 | * |
||
37 | * @param Event $event |
||
38 | * @return void |
||
39 | */ |
||
40 | public static function postAutoloadDump(Event $event) |
||
44 | } |
||
45 | |||
46 | protected static function clearCompiled() |
||
52 | } |
||
53 | // TODO: clear route cache for the broadcast channels. |
||
56 |
If you suppress an error, we recommend checking for the error condition explicitly: