Passed
Pull Request — master (#156)
by Alex
03:41
created
src/Asserts.php 1 patch
Spacing   +7 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             );
37 37
         };
38 38
         assert(
39
-            $expectedReflection->getNumberOfRequiredParameters() ===  $actualReflection->getNumberOfRequiredParameters(),
39
+            $expectedReflection->getNumberOfRequiredParameters() === $actualReflection->getNumberOfRequiredParameters(),
40 40
             $messageBuilder('Incorrect Parameter Count')
41 41
         );
42 42
         if ($expectedReflection->hasReturnType()) {
@@ -48,11 +48,9 @@  discard block
 block discarded – undo
48 48
             $expectedReturnType = $expectedReflection->getReturnType();
49 49
             $actualReturnType   = $actualReflection->getReturnType();
50 50
             $name               = $expectedReturnType instanceof ReflectionNamedType ?
51
-                $expectedReturnType->getName() :
52
-                strval($expectedReturnType);
51
+                $expectedReturnType->getName() : strval($expectedReturnType);
53 52
             $actName = $actualReturnType instanceof ReflectionNamedType ?
54
-                $actualReturnType->getName() :
55
-                strval($actualReturnType);
53
+                $actualReturnType->getName() : strval($actualReturnType);
56 54
 
57 55
             assert(
58 56
                 $name === $actName,
@@ -77,11 +75,9 @@  discard block
 block discarded – undo
77 75
                 $expectedParmType = $expectedParm->getType();
78 76
                 $actualParmType   = $actualParm->getType();
79 77
                 $name             = $expectedParmType instanceof ReflectionNamedType ?
80
-                    $expectedParmType->getName() :
81
-                    strval($expectedParmType);
78
+                    $expectedParmType->getName() : strval($expectedParmType);
82 79
                 $actName = $actualParmType instanceof ReflectionNamedType ?
83
-                    $actualParmType->getName() :
84
-                    strval($actualParmType);
80
+                    $actualParmType->getName() : strval($actualParmType);
85 81
 
86 82
                 //TODO: improve this to check that the actual type does not return a childType;
87 83
                 assert(
@@ -107,8 +103,7 @@  discard block
 block discarded – undo
107 103
             if ($parameter->hasType()) {
108 104
                 $parmType        = $parameter->getType();
109 105
                 $parmName        = $parmType instanceof ReflectionNamedType ?
110
-                                    $parmType->getName() :
111
-                                    strval($parmType);
106
+                                    $parmType->getName() : strval($parmType);
112 107
                 $parameterString .= $parmType->allowsNull() ? '?' : '';
113 108
                 $parameterString .= $parmName . ' ';
114 109
             }
@@ -127,8 +122,7 @@  discard block
 block discarded – undo
127 122
         if ($reflection->hasReturnType()) {
128 123
             $returnType = $reflection->getReturnType();
129 124
             $name       = $returnType instanceof ReflectionNamedType ?
130
-                $returnType->getName() :
131
-                strval($returnType);
125
+                $returnType->getName() : strval($returnType);
132 126
             $return .= ': ' . $name;
133 127
         }
134 128
         return sprintf('function(%s)%s', implode(',', $parameters), $return);
Please login to merge, or discard this patch.