Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 34 | public static function bootstrap(string $appRootDir, Closure $configFn = null): void |
|
22 | { |
||
23 | 34 | $setup = $configFn !== null |
|
24 | 18 | ? SetupGacela::fromCallable($configFn) |
|
25 | 34 | : new SetupGacela(); |
|
26 | |||
27 | 34 | if ($setup->isResetCache()) { |
|
28 | 8 | ClassNameFinder::resetCachedClassNames(); |
|
29 | 8 | AbstractClassResolver::resetCache(); |
|
30 | 8 | Config::resetInstance(); |
|
31 | } |
||
32 | |||
33 | 34 | Config::getInstance() |
|
34 | 34 | ->setAppRootDir($appRootDir) |
|
35 | 34 | ->setSetup($setup) |
|
36 | 34 | ->init(); |
|
37 | } |
||
39 |