Passed
Pull Request — master (#35)
by James
02:04
created
test/unit/ChangeTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace RoaveTest\ApiCompare;
5 5
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $changeText = uniqid('changeText', true);
17 17
         $change = Change::added($changeText, false);
18
-        self::assertSame('     ADDED: ' . $changeText, (string) $change);
18
+        self::assertSame('     ADDED: '.$changeText, (string) $change);
19 19
         self::assertTrue($change->isAdded());
20 20
         self::assertFalse($change->isChanged());
21 21
         self::assertFalse($change->isRemoved());
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $changeText = uniqid('changeText', true);
27 27
         $change = Change::added($changeText, true);
28
-        self::assertSame('[BC] ADDED: ' . $changeText, (string) $change);
28
+        self::assertSame('[BC] ADDED: '.$changeText, (string) $change);
29 29
         self::assertTrue($change->isAdded());
30 30
         self::assertFalse($change->isChanged());
31 31
         self::assertFalse($change->isRemoved());
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $changeText = uniqid('changeText', true);
37 37
         $change = Change::changed($changeText, false);
38
-        self::assertSame('     CHANGED: ' . $changeText, (string) $change);
38
+        self::assertSame('     CHANGED: '.$changeText, (string) $change);
39 39
         self::assertFalse($change->isAdded());
40 40
         self::assertTrue($change->isChanged());
41 41
         self::assertFalse($change->isRemoved());
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $changeText = uniqid('changeText', true);
47 47
         $change = Change::changed($changeText, true);
48
-        self::assertSame('[BC] CHANGED: ' . $changeText, (string) $change);
48
+        self::assertSame('[BC] CHANGED: '.$changeText, (string) $change);
49 49
         self::assertFalse($change->isAdded());
50 50
         self::assertTrue($change->isChanged());
51 51
         self::assertFalse($change->isRemoved());
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $changeText = uniqid('changeText', true);
57 57
         $change = Change::removed($changeText, false);
58
-        self::assertSame('     REMOVED: ' . $changeText, (string) $change);
58
+        self::assertSame('     REMOVED: '.$changeText, (string) $change);
59 59
         self::assertFalse($change->isAdded());
60 60
         self::assertFalse($change->isChanged());
61 61
         self::assertTrue($change->isRemoved());
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $changeText = uniqid('changeText', true);
67 67
         $change = Change::removed($changeText, true);
68
-        self::assertSame('[BC] REMOVED: ' . $changeText, (string) $change);
68
+        self::assertSame('[BC] REMOVED: '.$changeText, (string) $change);
69 69
         self::assertFalse($change->isAdded());
70 70
         self::assertFalse($change->isChanged());
71 71
         self::assertTrue($change->isRemoved());
Please login to merge, or discard this patch.
test/unit/Formatter/MarkdownPipedToSymfonyConsoleFormatterTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace RoaveTest\ApiCompare\Formatter;
5 5
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
         $output->expects(self::any())
37 37
             ->method('writeln')
38
-            ->willReturnCallback(function (string $output) use ($changeToExpect) {
38
+            ->willReturnCallback(function(string $output) use ($changeToExpect) {
39 39
                 self::assertContains($changeToExpect, $output);
40 40
             });
41 41
 
Please login to merge, or discard this patch.
test/unit/Command/ApiCompareTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace RoaveTest\ApiCompare\Command;
6 6
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function setUp() : void
67 67
     {
68
-        $this->sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../'));
68
+        $this->sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../'));
69 69
         chdir((string) $this->sourceRepository);
70 70
 
71 71
         $this->input   = $this->createMock(InputInterface::class);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $this->output->expects(self::any())
227 227
             ->method('writeln')
228
-            ->willReturnCallback(function (string $output) use ($changeToExpect) {
228
+            ->willReturnCallback(function(string $output) use ($changeToExpect) {
229 229
                 self::assertContains($changeToExpect, $output);
230 230
             });
231 231
     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         $this->getVersions->expects(self::once())
274 274
             ->method('fromRepository')
275
-            ->with(self::callback(function (CheckedOutRepository $checkedOutRepository) : bool {
275
+            ->with(self::callback(function(CheckedOutRepository $checkedOutRepository) : bool {
276 276
                 self::assertEquals($this->sourceRepository, $checkedOutRepository);
277 277
                 return true;
278 278
             }))
Please login to merge, or discard this patch.
src/Formatter/MarkdownPipedToSymfonyConsoleFormatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Roave\ApiCompare\Formatter;
5 5
 
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
         $this->output->writeln(
28 28
             "# Added\n"
29 29
             . implode('', $this->convertFilteredChangesToMarkdownBulletList(
30
-                function (Change $change) : bool {
30
+                function(Change $change) : bool {
31 31
                     return $change->isAdded();
32 32
                 },
33 33
                 ...$arrayOfChanges
34 34
             ))
35 35
             . "\n# Changed\n"
36 36
             . implode('', $this->convertFilteredChangesToMarkdownBulletList(
37
-                function (Change $change) : bool {
37
+                function(Change $change) : bool {
38 38
                     return $change->isChanged();
39 39
                 },
40 40
                 ...$arrayOfChanges
41 41
             ))
42 42
             . "\n# Removed\n"
43 43
             . implode('', $this->convertFilteredChangesToMarkdownBulletList(
44
-                function (Change $change) : bool {
44
+                function(Change $change) : bool {
45 45
                     return $change->isRemoved();
46 46
                 },
47 47
                 ...$arrayOfChanges
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     private function convertFilteredChangesToMarkdownBulletList(callable $filterFunction, Change ...$changes) : array
53 53
     {
54 54
         return array_map(
55
-            function (Change $change) : string {
56
-                return ' - ' . str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim((string)$change)) . "\n";
55
+            function(Change $change) : string {
56
+                return ' - '.str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim((string) $change))."\n";
57 57
             },
58 58
             array_filter($changes, $filterFunction)
59 59
         );
Please login to merge, or discard this patch.
src/Command/ApiCompare.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Roave\ApiCompare\Command;
6 6
 
@@ -113,21 +113,21 @@  discard block
 block discarded – undo
113 113
         $toRevision  = $this->parseRevision->fromStringForRepository($input->getOption('to'), $sourceRepo);
114 114
         $sourcesPath = $input->getArgument('sources-path');
115 115
 
116
-        $stdErr->writeln(sprintf('Comparing from %s to %s...', (string)$fromRevision, (string)$toRevision));
116
+        $stdErr->writeln(sprintf('Comparing from %s to %s...', (string) $fromRevision, (string) $toRevision));
117 117
 
118 118
         $fromPath = $this->git->checkout($sourceRepo, $fromRevision);
119 119
         $toPath   = $this->git->checkout($sourceRepo, $toRevision);
120 120
 
121 121
         try {
122
-            $fromSources = $fromPath . '/' . $sourcesPath;
123
-            $toSources   = $toPath . '/' . $sourcesPath;
122
+            $fromSources = $fromPath.'/'.$sourcesPath;
123
+            $toSources   = $toPath.'/'.$sourcesPath;
124 124
 
125 125
             Assert::that($fromSources)->directory();
126 126
             Assert::that($toSources)->directory();
127 127
 
128 128
             $changes = $this->comparator->compare(
129
-                $this->reflectorFactory->__invoke((string) $fromPath . '/' . $sourcesPath),
130
-                $this->reflectorFactory->__invoke((string) $toPath . '/' . $sourcesPath)
129
+                $this->reflectorFactory->__invoke((string) $fromPath.'/'.$sourcesPath),
130
+                $this->reflectorFactory->__invoke((string) $toPath.'/'.$sourcesPath)
131 131
             );
132 132
 
133 133
             (new SymfonyConsoleTextFormatter($stdErr))->write($changes);
Please login to merge, or discard this patch.