Conditions | 3 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.072 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 26 | public static function bootstrap(string $appRootDir, $configFn = null): void |
|
23 | { |
||
24 | 26 | if ($configFn instanceof SetupGacelaInterface) { |
|
25 | trigger_deprecation( |
||
26 | 'gacela-project/gacela', |
||
27 | '0.18', |
||
28 | '`SetupGacelaInterface` is deprecated. Use `callable(GacelaConfig)` instead.' |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | 26 | $setup = self::normalizeSetup($configFn); |
|
33 | |||
34 | 26 | if (!$setup->isClassResolverCached()) { |
|
35 | AbstractClassResolver::resetCache(); |
||
36 | } |
||
37 | |||
38 | 26 | Config::getInstance() |
|
39 | 26 | ->setAppRootDir($appRootDir) |
|
40 | 26 | ->setSetup($setup) |
|
41 | 26 | ->init(); |
|
42 | } |
||
60 |