@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function __construct(array $analysisResults) |
29 | 29 | { |
30 | - usort($analysisResults, function (AnalysisResult $a, AnalysisResult $b): int { |
|
30 | + usort($analysisResults, function(AnalysisResult $a, AnalysisResult $b): int { |
|
31 | 31 | return $a->getLocation()->compareTo($b->getLocation()); |
32 | 32 | }); |
33 | 33 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $foo16, |
37 | 37 | ]; |
38 | 38 | |
39 | - usort($list, function (Location $a, Location $b): int { |
|
39 | + usort($list, function(Location $a, Location $b): int { |
|
40 | 40 | return $a->compareTo($b); |
41 | 41 | }); |
42 | 42 |
@@ -52,16 +52,16 @@ |
||
52 | 52 | $result3 = $this->analysisResults->getAnalysisResults()[2]; |
53 | 53 | |
54 | 54 | $this->assertMatch($result1, |
55 | - 'src/Domain/ResultsParser/AnalysisResults.php', |
|
56 | - 67, |
|
57 | - 'MismatchingDocblockParamType' |
|
55 | + 'src/Domain/ResultsParser/AnalysisResults.php', |
|
56 | + 67, |
|
57 | + 'MismatchingDocblockParamType' |
|
58 | 58 | ); |
59 | 59 | $this->assertSame('', $result1->getMessage()); |
60 | 60 | |
61 | 61 | $this->assertMatch($result2, |
62 | 62 | 'src/Domain/Utils/JsonUtils.php', |
63 | 63 | 29, |
64 | - 'MixedAssignment' |
|
64 | + 'MixedAssignment' |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | $this->assertMatch($result3, |
@@ -84,7 +84,7 @@ |
||
84 | 84 | return [ |
85 | 85 | ['phan', new PhanJsonIdentifier()], |
86 | 86 | ['phpcs-json', new PhpCodeSnifferJsonIdentifier()], |
87 | - ['phpcs-txt', new PhpCodeSnifferJsonIdentifier()], |
|
87 | + ['phpcs-txt', new PhpCodeSnifferJsonIdentifier()], |
|
88 | 88 | ['phpmd', new PhpmdJsonIdentifier()], |
89 | 89 | ['phpstan-json', new PhpstanJsonIdentifier()], |
90 | 90 | ['phpstan-text', new PhpstanJsonIdentifier()], |
@@ -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 |
@@ -364,7 +364,7 @@ |
||
364 | 364 | /** @return array<int,array{string,string, string}> */ |
365 | 365 | public function provideMakeRelativeTests(): array |
366 | 366 | { |
367 | - $paths = array_map(function (array $arguments) { |
|
367 | + $paths = array_map(function(array $arguments) { |
|
368 | 368 | return [$arguments[2], $arguments[1], $arguments[0]]; |
369 | 369 | }, $this->providePathTests()); |
370 | 370 |
@@ -119,8 +119,7 @@ |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // Add the root directory again |
122 | - self::$buffer[$path] = $canonicalPath = $root.implode('/', $canonicalParts); |
|
123 | - ++self::$bufferSize; |
|
122 | + self::$buffer[$path] = $canonicalPath = $root.implode('/', $canonicalParts);++self::$bufferSize; |
|
124 | 123 | |
125 | 124 | // Clean up regularly to prevent memory leaks |
126 | 125 | if (self::$bufferSize > self::CLEANUP_THRESHOLD) { |