Skip to content

Commit c19b570

Browse files
Fix
1 parent 86b5f89 commit c19b570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Parser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ function parse(array $resultDiff, string $format): string
1414
function parseToJson(string $path): array
1515
{
1616
$content = getFileContent($path);
17-
$offset = strpos($path, '.') + 1;
17+
$offset = strpos($path, '.');
1818

1919
if ($offset === false) {
2020
throw new \Exception("Incorrect path");
2121
}
2222

23-
$extension = substr($path, $offset);
23+
$extension = substr($path, $offset + 1);
2424

2525
return match ($extension) {
2626
'json' => json_decode($content, true),

0 commit comments

Comments
 (0)