Passed
Pull Request — master (#5)
by
unknown
08:17
created
library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 {
29 29
     public function apply($code, MockConfiguration $config)
30 30
     {
31
-        $names = array_map(function ($method) {
31
+        $names = array_map(function($method) {
32 32
             return $method->getName();
33 33
         }, $config->getMethodsToMock());
34 34
     
Please login to merge, or discard this patch.
mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
         $code = str_replace(
51 51
             "implements MockInterface",
52
-            "extends \\" . $className . " implements MockInterface",
52
+            "extends \\".$className." implements MockInterface",
53 53
             $code
54 54
         );
55 55
 
Please login to merge, or discard this patch.
mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             return $code;
33 33
         }
34 34
 
35
-        $useStatements = array_map(function ($trait) {
35
+        $useStatements = array_map(function($trait) {
36 36
             return "use \\\\".ltrim($trait->getName(), "\\").";";
37 37
         }, $traits);
38 38
 
Please login to merge, or discard this patch.
Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         if (is_null($class)) {
82 82
             return array();
83 83
         }
84
-        return array_filter($class->getMethods(), function (Method $method) {
84
+        return array_filter($class->getMethods(), function(Method $method) {
85 85
             return in_array($method->getName(), $this->mockMagicMethods);
86 86
         });
87 87
     }
@@ -154,8 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
         $groupMatches = end($parameterMatches);
156 156
         $parameterNames = is_array($groupMatches) ?
157
-            $groupMatches                         :
158
-            array($groupMatches);
157
+            $groupMatches : array($groupMatches);
159 158
 
160 159
         return $parameterNames;
161 160
     }
@@ -178,8 +177,7 @@  discard block
 block discarded – undo
178 177
         foreach ($method->getParameters() as $index => $parameter) {
179 178
             $declaration .= $parameter->getTypeHintAsString().' ';
180 179
             $name = isset($namedParameters[$index]) ?
181
-                $namedParameters[$index]            :
182
-                $parameter->getName();
180
+                $namedParameters[$index] : $parameter->getName();
183 181
             $declaration .= '$'.$name;
184 182
             $declaration .= ',';
185 183
         }
Please login to merge, or discard this patch.
mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
 
35 35
         $code = str_replace(
36 36
             'namespace Mockery;',
37
-            $namespace ? 'namespace ' . $namespace . ';' : '',
37
+            $namespace ? 'namespace '.$namespace.';' : '',
38 38
             $code
39 39
         );
40 40
 
41 41
         $code = str_replace(
42 42
             'class Mock',
43
-            'class ' . $className,
43
+            'class '.$className,
44 44
             $code
45 45
         );
46 46
 
Please login to merge, or discard this patch.
library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $overrides = $config->getParameterOverrides();
62 62
 
63 63
             if (isset($overrides[strtolower($class->getName())][$method->getName()])) {
64
-                return '(' . implode(',', $overrides[strtolower($class->getName())][$method->getName()]) . ')';
64
+                return '('.implode(',', $overrides[strtolower($class->getName())][$method->getName()]).')';
65 65
             }
66 66
         }
67 67
 
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
             $paramDef = $this->renderTypeHint($param);
72 72
             $paramDef .= $param->isPassedByReference() ? '&' : '';
73 73
             $paramDef .= $param->isVariadic() ? '...' : '';
74
-            $paramDef .= '$' . $param->getName();
74
+            $paramDef .= '$'.$param->getName();
75 75
 
76 76
             if (!$param->isVariadic()) {
77 77
                 if (false !== $param->isDefaultValueAvailable()) {
78
-                    $paramDef .= ' = ' . var_export($param->getDefaultValue(), true);
78
+                    $paramDef .= ' = '.var_export($param->getDefaultValue(), true);
79 79
                 } elseif ($param->isOptional()) {
80 80
                     $paramDef .= ' = null';
81 81
                 }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
             $methodParams[] = $paramDef;
85 85
         }
86
-        return '(' . implode(', ', $methodParams) . ')';
86
+        return '('.implode(', ', $methodParams).')';
87 87
     }
88 88
 
89 89
     protected function renderReturnType(Method $method)
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     protected function appendToClass($class, $code)
96 96
     {
97 97
         $lastBrace = strrpos($class, "}");
98
-        $class = substr($class, 0, $lastBrace) . $code . "\n    }\n";
98
+        $class = substr($class, 0, $lastBrace).$code."\n    }\n";
99 99
         return $class;
100 100
     }
101 101
 
Please login to merge, or discard this patch.
library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     protected function appendToClass($class, $code)
78 78
     {
79 79
         $lastBrace = strrpos($class, "}");
80
-        $class = substr($class, 0, $lastBrace) . $code . "\n    }\n";
80
+        $class = substr($class, 0, $lastBrace).$code."\n    }\n";
81 81
         return $class;
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
Pass/RemoveUnserializeForInternalSerializableClassesPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     protected function appendToClass($class, $code)
53 53
     {
54 54
         $lastBrace = strrpos($class, "}");
55
-        $class = substr($class, 0, $lastBrace) . $code . "\n    }\n";
55
+        $class = substr($class, 0, $lastBrace).$code."\n    }\n";
56 56
         return $class;
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
             }
34 34
         }
35 35
 
36
-        $interfaces = array_reduce((array) $config->getTargetInterfaces(), function ($code, $i) {
37
-            return $code . ", \\" . ltrim($i->getName(), "\\");
36
+        $interfaces = array_reduce((array) $config->getTargetInterfaces(), function($code, $i) {
37
+            return $code.", \\".ltrim($i->getName(), "\\");
38 38
         }, "");
39 39
 
40 40
         $code = str_replace(
41 41
             "implements MockInterface",
42
-            "implements MockInterface" . $interfaces,
42
+            "implements MockInterface".$interfaces,
43 43
             $code
44 44
         );
45 45
 
Please login to merge, or discard this patch.