Completed
Pull Request — master (#108)
by Marco
04:12
created
src/DetectChanges/BCBreak/PropertyBased/OnlyProtectedPropertyChanged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function __invoke(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes
21 21
     {
22
-        if (! $fromProperty->isProtected()) {
22
+        if (!$fromProperty->isProtected()) {
23 23
             return Changes::empty();
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/PropertyBased/OnlyPublicPropertyChanged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function __invoke(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes
21 21
     {
22
-        if (! $fromProperty->isPublic()) {
22
+        if (!$fromProperty->isPublic()) {
23 23
             return Changes::empty();
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/DetectChanges/Variance/TypeIsCovariant.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             return false;
31 31
         }
32 32
 
33
-        if ($comparedType->allowsNull() && ! $type->allowsNull()) {
33
+        if ($comparedType->allowsNull() && !$type->allowsNull()) {
34 34
             return false;
35 35
         }
36 36
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             return false;
47 47
         }
48 48
 
49
-        if (strtolower($typeAsString) === 'object' && ! $comparedType->isBuiltin()) {
49
+        if (strtolower($typeAsString) === 'object' && !$comparedType->isBuiltin()) {
50 50
             // `object` is not covariant to a defined class type
51 51
             return true;
52 52
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return true;
57 57
         }
58 58
 
59
-        if (strtolower($typeAsString) === 'iterable' && ! $comparedType->isBuiltin()) {
59
+        if (strtolower($typeAsString) === 'iterable' && !$comparedType->isBuiltin()) {
60 60
             if ($comparedType->targetReflectionClass()->implementsInterface(\Traversable::class)) {
61 61
                 // `iterable` can be restricted via any `Iterator` implementation
62 62
                 return true;
Please login to merge, or discard this patch.
src/DetectChanges/Variance/TypeIsContravariant.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             return false;
30 30
         }
31 31
 
32
-        if ($type->allowsNull() && ! $comparedType->allowsNull()) {
32
+        if ($type->allowsNull() && !$comparedType->allowsNull()) {
33 33
             return false;
34 34
         }
35 35
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             return true;
46 46
         }
47 47
 
48
-        if (strtolower($comparedTypeAsString) === 'object' && ! $type->isBuiltin()) {
48
+        if (strtolower($comparedTypeAsString) === 'object' && !$type->isBuiltin()) {
49 49
             // `object` is always contravariant to any object type
50 50
             return true;
51 51
         }
Please login to merge, or discard this patch.
test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function setUp() : void
28 28
     {
29
-        $tmpGitRepo = sys_get_temp_dir() . '/api-compare-' . uniqid('tmpGitRepo', true);
29
+        $tmpGitRepo = sys_get_temp_dir().'/api-compare-'.uniqid('tmpGitRepo', true);
30 30
         mkdir($tmpGitRepo, 0777, true);
31 31
         (new Process(['git', 'init']))->setWorkingDirectory($tmpGitRepo)->mustRun();
32
-        file_put_contents($tmpGitRepo . '/test', uniqid('testContent', true));
32
+        file_put_contents($tmpGitRepo.'/test', uniqid('testContent', true));
33 33
         (new Process(['git', 'add', '.']))->setWorkingDirectory($tmpGitRepo)->mustRun();
34 34
         (new Process(['git', 'commit', '-m', '"whatever"']))->setWorkingDirectory($tmpGitRepo)->mustRun();
35 35
         $this->repoPath = CheckedOutRepository::fromPath($tmpGitRepo);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     private function getTags() : array
50 50
     {
51 51
         return array_map(
52
-            function (Version $version) {
52
+            function(Version $version) {
53 53
                 return $version->getVersionString();
54 54
             },
55 55
             iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath))
Please login to merge, or discard this patch.
test/unit/Git/PickLastMinorVersionFromCollectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         self::assertSame(
38 38
             $expectedVersion,
39 39
             (new PickLastMinorVersionFromCollection())->forVersions(
40
-                new VersionsCollection(...array_map(function (string $version) : Version {
40
+                new VersionsCollection(...array_map(function(string $version) : Version {
41 41
                     return Version::fromString($version);
42 42
                 }, $collectionOfVersions))
43 43
             )->getVersionString()
Please login to merge, or discard this patch.
src/Git/GetVersionCollectionFromGitRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             ->getOutput();
32 32
 
33 33
         return new VersionsCollection(...array_filter(
34
-            array_map(function (string $maybeVersion) : ?Version {
34
+            array_map(function(string $maybeVersion) : ?Version {
35 35
                 try {
36 36
                     return Version::fromString($maybeVersion);
37 37
                 } catch (InvalidVersionStringException $e) {
Please login to merge, or discard this patch.
src/SourceLocator/StubClassSourceLocator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     protected function createLocatedSource(Identifier $identifier) : ?LocatedSource
36 36
     {
37
-        if (! $identifier->isClass()) {
37
+        if (!$identifier->isClass()) {
38 38
             return null;
39 39
         }
40 40
 
Please login to merge, or discard this patch.
test/e2e/Command/AssertBackwardsCompatibleTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
             (new Process('git add -A', $this->sourcesRepository))->mustRun();
121 121
             (new Process(sprintf('git commit -am "Class sources v%d"', $key + 1), $this->sourcesRepository))->mustRun();
122 122
             $this->versions[$key] = trim((new Process('git rev-parse HEAD', $this->sourcesRepository))->mustRun()
123
-                                                                                                      ->getOutput());
123
+                                                                                                        ->getOutput());
124 124
         }
125 125
     }
126 126
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -105,20 +105,20 @@  discard block
 block discarded – undo
105 105
 
106 106
         unlink($this->sourcesRepository);
107 107
         mkdir($this->sourcesRepository);
108
-        mkdir($this->sourcesRepository . '/src');
108
+        mkdir($this->sourcesRepository.'/src');
109 109
 
110 110
         self::assertDirectoryExists($this->sourcesRepository);
111
-        self::assertDirectoryExists($this->sourcesRepository . '/src');
111
+        self::assertDirectoryExists($this->sourcesRepository.'/src');
112 112
 
113 113
         (new Process('git init', $this->sourcesRepository))->mustRun();
114 114
 
115
-        file_put_contents($this->sourcesRepository . '/composer.json', self::COMPOSER_MANIFEST);
115
+        file_put_contents($this->sourcesRepository.'/composer.json', self::COMPOSER_MANIFEST);
116 116
 
117 117
         (new Process('git add -A', $this->sourcesRepository))->mustRun();
118 118
         (new Process('git commit -am "Initial commit with composer manifest"', $this->sourcesRepository))->mustRun();
119 119
 
120 120
         foreach (self::CLASS_VERSIONS as $key => $classCode) {
121
-            file_put_contents($this->sourcesRepository . '/src/TheClass.php', $classCode);
121
+            file_put_contents($this->sourcesRepository.'/src/TheClass.php', $classCode);
122 122
 
123 123
             (new Process('git add -A', $this->sourcesRepository))->mustRun();
124 124
             (new Process(sprintf('git commit -am "Class sources v%d"', $key + 1), $this->sourcesRepository))->mustRun();
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $check = new Process(
145 145
             [
146
-                __DIR__ . '/../../../bin/roave-backward-compatibility-check',
147
-                '--from=' . $this->versions[0],
148
-                '--to=' . $this->versions[1],
146
+                __DIR__.'/../../../bin/roave-backward-compatibility-check',
147
+                '--from='.$this->versions[0],
148
+                '--to='.$this->versions[1],
149 149
             ],
150 150
             $this->sourcesRepository
151 151
         );
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function testWillNotRunWithoutTagsNorSpecifiedVersions() : void
166 166
     {
167 167
         $check = new Process(
168
-            __DIR__ . '/../../../bin/roave-backward-compatibility-check',
168
+            __DIR__.'/../../../bin/roave-backward-compatibility-check',
169 169
             $this->sourcesRepository
170 170
         );
171 171
 
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
     {
181 181
         $check = new Process(
182 182
             [
183
-                __DIR__ . '/../../../bin/roave-backward-compatibility-check',
184
-                '--from=' . $this->versions[0],
185
-                '--to=' . $this->versions[3],
183
+                __DIR__.'/../../../bin/roave-backward-compatibility-check',
184
+                '--from='.$this->versions[0],
185
+                '--to='.$this->versions[3],
186 186
             ],
187 187
             $this->sourcesRepository
188 188
         );
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
 
201 201
         $check = new Process(
202 202
             [
203
-                __DIR__ . '/../../../bin/roave-backward-compatibility-check',
204
-                '--to=' . $this->versions[2],
203
+                __DIR__.'/../../../bin/roave-backward-compatibility-check',
204
+                '--to='.$this->versions[2],
205 205
             ],
206 206
             $this->sourcesRepository
207 207
         );
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
 
230 230
         $check = new Process(
231 231
             [
232
-                __DIR__ . '/../../../bin/roave-backward-compatibility-check',
233
-                '--to=' . $this->versions[2],
232
+                __DIR__.'/../../../bin/roave-backward-compatibility-check',
233
+                '--to='.$this->versions[2],
234 234
             ],
235 235
             $this->sourcesRepository
236 236
         );
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
                 'tag',
269 269
                 $tagName,
270 270
                 '-m',
271
-                'A tag for version ' . $version,
271
+                'A tag for version '.$version,
272 272
             ],
273 273
             $this->sourcesRepository
274 274
         ))->mustRun();
Please login to merge, or discard this patch.