Completed
Push — master ( 9c2edf...e28b75 )
by Dave
31s queued 15s
created
src/Domain/ResultsParser/AnalysisResults.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Unit/Core/Analyser/LocationSortTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Integration/UpgradeV0BaselineFilesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
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()],
Please login to merge, or discard this patch.
example/eslint2sarb.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
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'],
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,14 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Unit/Core/Utils/PathTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Domain/Utils/Path.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Domain/BaseLiner/BaseLineImporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@
 block discarded – undo
80 80
 
81 81
             return new BaseLine($historyFactory, $analysisResults, $resultsParser, $historyMarker);
82 82
         } catch (
83
-            ArrayParseException|
84
-            InvalidResultsParserException|
85
-            InvalidHistoryFactoryException|
86
-            InvalidHistoryMarkerException|
87
-            InvalidContentTypeException|
83
+            ArrayParseException |
84
+            InvalidResultsParserException |
85
+            InvalidHistoryFactoryException |
86
+            InvalidHistoryMarkerException |
87
+            InvalidContentTypeException |
88 88
             ParseAtLocationException $e) {
89 89
                 throw BaseLineImportException::fromException($fileName, $e);
90 90
             }
Please login to merge, or discard this patch.
src/Domain/ResultsParser/AnalysisResultsImporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     ): AnalysisResults {
21 21
         try {
22 22
             return $resultsParser->convertFromString($analysisResultsAsString, $projectRoot);
23
-        } catch (InvalidContentTypeException|ParseAtLocationException $e) {
23
+        } catch (InvalidContentTypeException | ParseAtLocationException $e) {
24 24
             throw AnalysisResultsImportException::fromException($resultsParser->getIdentifier(), $e);
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
ResultsParsers/SarbJsonResultsParser/SarbRelativeFileJsonResultsParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                 ArrayUtils::assertArray($analysisResultAsArray);
63 63
                 $analysisResult = $this->convertAnalysisResultFromArray($analysisResultAsArray, $projectRoot);
64 64
                 $analysisResultsBuilder->addAnalysisResult($analysisResult);
65
-            } catch (ArrayParseException|InvalidPathException $e) {
65
+            } catch (ArrayParseException | InvalidPathException $e) {
66 66
                 throw ParseAtLocationException::issueAtPosition($e, $resultsCount);
67 67
             }
68 68
         }
Please login to merge, or discard this patch.