@@ -8,11 +8,11 @@ |
||
8 | 8 | |
9 | 9 | $issues = []; |
10 | 10 | |
11 | -foreach($asJson as $fileWithIssues) { |
|
11 | +foreach ($asJson as $fileWithIssues) { |
|
12 | 12 | |
13 | 13 | $fileName = $fileWithIssues['filePath']; |
14 | 14 | |
15 | - foreach($fileWithIssues['messages'] as $issue) { |
|
15 | + foreach ($fileWithIssues['messages'] as $issue) { |
|
16 | 16 | $issues[] = [ |
17 | 17 | 'file' => $fileName, |
18 | 18 | 'line' => $issue['line'], |
@@ -1,10 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $inputData = stream_get_contents(STDIN); |
4 | -if ($inputData === false) die("Could not read input"); |
|
4 | +if ($inputData === false) { |
|
5 | + die("Could not read input"); |
|
6 | +} |
|
5 | 7 | |
6 | 8 | $asJson = json_decode($inputData, true); |
7 | -if (!is_array($asJson)) die ("Could not parse JSON"); |
|
9 | +if (!is_array($asJson)) { |
|
10 | + die ("Could not parse JSON"); |
|
11 | +} |
|
8 | 12 | |
9 | 13 | $issues = []; |
10 | 14 |