Skip to content

Commit 3f6940c

Browse files
Fix match expression does not handle remaining value: string
1 parent 18c78b4 commit 3f6940c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Parser.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function parseToJson(string $path): array
1818

1919
return match ($extension) {
2020
'json' => json_decode($content, true),
21-
'yaml' => Yaml::parse($content)
21+
'yaml' => Yaml::parse($content),
22+
default => throw new \Exception("There is no such extension: {$extension}")
2223
};
2324
}
2425

0 commit comments

Comments
 (0)