Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 54.55% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | final class LibYamlFrontMatterParser implements FrontMatterDataParserInterface |
||
20 | { |
||
21 | public static function capable(): ?LibYamlFrontMatterParser |
||
22 | { |
||
23 | if (! \extension_loaded('yaml')) { |
||
24 | return null; |
||
25 | } |
||
26 | |||
27 | return new LibYamlFrontMatterParser(); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | 10 | public function parse(string $frontMatter) |
|
46 | } |
||
47 | } |
||
48 |