Conditions | 3 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
19 | public static function postCreateProject() |
||
20 | { |
||
21 | try { |
||
22 | $path = str_replace( |
||
23 | 'composer.json', |
||
24 | 'installer.yml', |
||
25 | Factory::getComposerFile() |
||
26 | ); |
||
27 | |||
28 | if (!file_exists($path)) { |
||
29 | throw new InvalidArgumentException('Missing installer configuration file'); |
||
30 | } |
||
31 | |||
32 | static::install($path); |
||
|
|||
33 | } catch (Throwable $throwable) { |
||
34 | echo get_class($throwable), ' thrown with message: ', $throwable->getMessage(), PHP_EOL; |
||
35 | echo $throwable->getTraceAsString(), PHP_EOL; |
||
36 | exit(1); |
||
37 | } |
||
38 | } |
||
39 | |||
55 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.