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