Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class YamlConfigLoader extends FileLoader |
||
13 | { |
||
14 | /** |
||
15 | * @param mixed $resource The resource |
||
16 | * @param string|null $type The resource type or null if unknown |
||
17 | * |
||
18 | * @return mixed |
||
19 | */ |
||
20 | public function load($resource, $type = null) |
||
21 | { |
||
22 | return Yaml::parse(\file_get_contents($resource)); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param mixed $resource A resource |
||
27 | * @param string|null $type The resource type or null if unknown |
||
28 | * |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function supports($resource, $type = null): bool |
||
36 | ); |
||
37 | } |
||
38 | } |