Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Yaml | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
3 | |
100.00% |
1 / 1 |
parseFile | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
3 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Projom\Util; |
6 | |
7 | use Projom\Util\File; |
8 | |
9 | class Yaml |
10 | { |
11 | public static function parseFile(string $fullFilePath): array |
12 | { |
13 | if (!$fullFilePath) |
14 | return []; |
15 | |
16 | if (!$yaml = File::read($fullFilePath)) |
17 | return []; |
18 | |
19 | $decoded = yaml_parse($yaml); |
20 | |
21 | return $decoded; |
22 | } |
23 | } |