Completed
Pull Request — master (#198)
by Marco
15:41 queued 01:27
created
src/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameClass.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 {
18 18
     public function __invoke(ReflectionClass $fromInterface, ReflectionClass $toInterface) : Changes
19 19
     {
20
-        if (! $this->isClass($toInterface) || ! $fromInterface->isInterface()) {
20
+        if (!$this->isClass($toInterface) || !$fromInterface->isInterface()) {
21 21
             // checking whether a class became an interface is done in `ClassBecameInterface`
22 22
             return Changes::empty();
23 23
         }
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
      */
34 34
     private function isClass(ReflectionClass $class) : bool
35 35
     {
36
-        return ! ($class->isTrait() || $class->isInterface());
36
+        return !($class->isTrait() || $class->isInterface());
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 {
18 18
     public function __invoke(ReflectionClass $fromInterface, ReflectionClass $toInterface) : Changes
19 19
     {
20
-        if (! $toInterface->isTrait() || ! $fromInterface->isInterface()) {
20
+        if (!$toInterface->isTrait() || !$fromInterface->isInterface()) {
21 21
             // checking whether an interface became an class is done in `InterfaceBecameClass`
22 22
             return Changes::empty();
23 23
         }
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/InterfaceBased/AncestorRemoved.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             array_diff($fromInterface->getInterfaceNames(), $toInterface->getInterfaceNames())
24 24
         );
25 25
 
26
-        if (! $removedAncestors) {
26
+        if (!$removedAncestors) {
27 27
             return Changes::empty();
28 28
         }
29 29
 
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/FunctionBased/FunctionBecameInternal.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
     public function __invoke(ReflectionFunctionAbstract $fromFunction, ReflectionFunctionAbstract $toFunction) : Changes
28 28
     {
29 29
         if ($this->isInternalDocComment($toFunction->getDocComment())
30
-            && ! $this->isInternalDocComment($fromFunction->getDocComment())
30
+            && !$this->isInternalDocComment($fromFunction->getDocComment())
31 31
         ) {
32 32
             return Changes::fromList(Change::changed(
33 33
                 sprintf(
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/PropertyBased/PropertyBecameInternal.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
     public function __invoke(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes
28 28
     {
29 29
         if ($this->isInternalDocComment($toProperty->getDocComment())
30
-            && ! $this->isInternalDocComment($fromProperty->getDocComment())
30
+            && !$this->isInternalDocComment($fromProperty->getDocComment())
31 31
         ) {
32 32
             return Changes::fromList(Change::changed(
33 33
                 sprintf(
Please login to merge, or discard this patch.
test/unit/ChangesTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function testFromIteratorBuffersAllChangesWithoutLoadingThemEagerly() : void
50 50
     {
51
-        $stopProducingValues = static function () : void {
51
+        $stopProducingValues = static function() : void {
52 52
             self::fail('No values should have been produced');
53 53
         };
54 54
 
55
-        $changesProvider = static function () use (&$stopProducingValues) : Generator {
55
+        $changesProvider = static function() use (&$stopProducingValues) : Generator {
56 56
             $stopProducingValues();
57 57
 
58 58
             yield Change::changed('a', true);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             Change::changed('b', false),
72 72
         ];
73 73
 
74
-        $stopProducingValues = static function () : void {
74
+        $stopProducingValues = static function() : void {
75 75
         };
76 76
 
77 77
         self::assertEquals($expectedChanges, iterator_to_array($changes));
Please login to merge, or discard this patch.
test/unit/Formatter/ReflectionPropertyNameTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         return TypeRestriction::array(array_combine(
70 70
             array_keys($properties),
71 71
             array_map(
72
-                static function (string $expectedMessage, ReflectionProperty $property) : array {
72
+                static function(string $expectedMessage, ReflectionProperty $property) : array {
73 73
                     return [$property, $expectedMessage];
74 74
                 },
75 75
                 array_keys($properties),
Please login to merge, or discard this patch.
test/unit/DetectChanges/BCBreak/MethodBased/MethodBecameFinalTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         self::assertSame(
39 39
             $expectedMessages,
40
-            array_map(static function (Change $change) : string {
40
+            array_map(static function(Change $change) : string {
41 41
                 return $change->__toString();
42 42
             }, iterator_to_array($changes))
43 43
         );
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             array_keys($properties),
129 129
             array_map(
130 130
                 /** @psalm-param list<string> $errorMessages https://github.com/vimeo/psalm/issues/2772 */
131
-                static function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array {
131
+                static function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array {
132 132
                     return [
133 133
                         $fromClass->getMethod($methodName),
134 134
                         $toClass->getMethod($methodName),
Please login to merge, or discard this patch.
test/unit/DetectChanges/BCBreak/MethodBased/MethodVisibilityReducedTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         self::assertSame(
39 39
             $expectedMessages,
40
-            array_map(static function (Change $change) : string {
40
+            array_map(static function(Change $change) : string {
41 41
                 return $change->__toString();
42 42
             }, iterator_to_array($changes))
43 43
         );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             array_keys($properties),
115 115
             array_map(
116 116
                 /** @psalm-param list<string> $errorMessages https://github.com/vimeo/psalm/issues/2772 */
117
-                static function (string $method, array $errorMessages) use ($fromClass, $toClass) : array {
117
+                static function(string $method, array $errorMessages) use ($fromClass, $toClass) : array {
118 118
                     return [
119 119
                         $fromClass->getMethod($method),
120 120
                         $toClass->getMethod($method),
Please login to merge, or discard this patch.