src/Parser/JsonParser.php 1 location
|
@@ 56-61 (lines=6) @@
|
53 |
|
throw new ParserException("{$file->getRelativePathname()}: {$error}"); |
54 |
|
} |
55 |
|
|
56 |
|
if (isset($parsed['entries'])) { |
57 |
|
$data += $parsed['entries']; |
58 |
|
} else { |
59 |
|
$id = str_replace(".{$file->getExtension()}", '', $file->getFilename()); |
60 |
|
$data[$id] = $parsed; |
61 |
|
} |
62 |
|
} |
63 |
|
|
64 |
|
$data = $this->parseArrayData($data); |
src/Parser/YamlParser.php 1 location
|
@@ 56-61 (lines=6) @@
|
53 |
|
try { |
54 |
|
$parsed = Yaml::parse($file->getContents()); |
55 |
|
|
56 |
|
if (isset($parsed['entries'])) { |
57 |
|
$yamlData += $parsed['entries']; |
58 |
|
} else { |
59 |
|
$id = str_replace(".{$file->getExtension()}", '', $file->getFilename()); |
60 |
|
$yamlData[$id] = $parsed; |
61 |
|
} |
62 |
|
} catch (ParseException $e) { |
63 |
|
throw new ParserException("{$file->getRelativePathname()}: {$e->getMessage()}"); |
64 |
|
} |