Conditions | 3 |
Paths | 5 |
Total Lines | 26 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
19 | public static function postCreateProject() |
||
20 | { |
||
21 | require_once str_replace( |
||
22 | 'composer.json', |
||
23 | 'vendor/autoload.php', |
||
24 | Factory::getComposerFile() |
||
25 | ); |
||
26 | |||
27 | try { |
||
28 | $path = str_replace( |
||
29 | 'composer.json', |
||
30 | 'installer.yml', |
||
31 | Factory::getComposerFile() |
||
32 | ); |
||
33 | |||
34 | if (!file_exists($path)) { |
||
35 | throw new InvalidArgumentException('Missing installer configuration file'); |
||
36 | } |
||
37 | |||
38 | static::install($path); |
||
|
|||
39 | } catch (Throwable $throwable) { |
||
40 | echo get_class($throwable), ' thrown with message: ', $throwable->getMessage(), PHP_EOL; |
||
41 | echo $throwable->getTraceAsString(), PHP_EOL; |
||
42 | exit(1); |
||
43 | } |
||
44 | } |
||
45 | |||
61 |
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.