Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | 51 | private static function processConfigFnIntoSetup(string $appRootDir, Closure $configFn = null): SetupGacelaInterface |
|
42 | { |
||
43 | 51 | if ($configFn !== null) { |
|
44 | 30 | return SetupGacela::fromCallable($configFn); |
|
45 | } |
||
46 | |||
47 | 21 | $gacelaFilePath = $appRootDir . '/gacela.php'; |
|
48 | |||
49 | 21 | if (is_file($gacelaFilePath)) { |
|
50 | 10 | return SetupGacela::fromFile($gacelaFilePath); |
|
51 | } |
||
52 | |||
53 | 11 | return new SetupGacela(); |
|
54 | } |
||
56 |