Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 4 | public function createGacelaJsonConfig(): GacelaJsonConfig |
|
21 | { |
||
22 | 4 | $gacelaJsonPath = $this->applicationRootDir . '/' . $this->gacelaConfigFilename; |
|
23 | |||
24 | 4 | if (is_file($gacelaJsonPath)) { |
|
25 | /** @psalm-suppress MixedArgumentTypeCoercion */ |
||
26 | 3 | return GacelaJsonConfig::fromArray( |
|
27 | 3 | (array)json_decode(file_get_contents($gacelaJsonPath), true) |
|
28 | ); |
||
29 | } |
||
30 | |||
31 | 1 | return GacelaJsonConfig::withDefaults(); |
|
32 | } |
||
34 |