Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public static function read(string $filePath): ManifestFile |
||
32 | { |
||
33 | if (!is_readable($filePath)) { |
||
34 | throw new RuntimeException("The module manifest file `$filePath` can not be read"); |
||
35 | } |
||
36 | |||
37 | $data = include($filePath); |
||
38 | |||
39 | return new ManifestFile($data['name'] ?? 'N/A', $data['version'] ?? null); |
||
40 | } |
||
52 |