| Conditions | 4 |
| Paths | 5 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public static function convertFrontmatter($string, $type = 'yaml') |
||
| 25 | { |
||
| 26 | switch ($type) { |
||
| 27 | case 'ini': |
||
| 28 | return parse_ini_string($string); |
||
| 29 | case 'yaml': |
||
| 30 | default: |
||
| 31 | try { |
||
| 32 | return Yaml::parse((string) $string); |
||
| 33 | } catch (ParseException $e) { |
||
| 34 | throw new Exception($e->getMessage()); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 49 |