Passed
Pull Request — master (#5)
by
unknown
08:17
created
vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     public function __toString()
84 84
     {
85 85
         if (null === $this->string) {
86
-            $this->string = implode(', ', array_map(function ($token) {
86
+            $this->string = implode(', ', array_map(function($token) {
87 87
                 return (string) $token;
88 88
             }, $this->tokens));
89 89
         }
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
     }
171 171
 
172 172
     private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName,
173
-                                                   array $arguments)
173
+                                                    array $arguments)
174 174
     {
175 175
         $classname = get_class($prophecy->reveal());
176 176
         $indentationLength = 8; // looks good
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         // Sort matches by their score value
101
-        @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; });
101
+        @usort($matches, function($match1, $match2) { return $match2[0] - $match1[0]; });
102 102
 
103 103
         $score = $matches[0][0];
104 104
         // If Highest rated method prophecy has a promise - execute it or return null instead
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $methodName = strtolower($methodName);
146 146
 
147 147
         return array_values(
148
-            array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) {
148
+            array_filter($this->recordedCalls, function(Call $call) use ($methodName, $wildcard) {
149 149
                 return $methodName === strtolower($call->getMethodName())
150 150
                     && 0 < $call->getScore($wildcard)
151 151
                 ;
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 
187 187
         foreach (call_user_func_array('array_merge', $prophecy->getMethodProphecies()) as $methodProphecy) {
188 188
             $expected[] = sprintf(
189
-                "  - %s(\n" .
190
-                "%s\n" .
189
+                "  - %s(\n".
190
+                "%s\n".
191 191
                 "    )",
192 192
                 $methodProphecy->getMethodName(),
193 193
                 implode(
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     {
221 221
         return preg_replace_callback(
222 222
             '/^/m',
223
-            function () use ($indentationLength) {
223
+            function() use ($indentationLength) {
224 224
                 return str_repeat(' ', $indentationLength);
225 225
             },
226 226
             $arguments
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             $stringify = array($this, __FUNCTION__);
49 49
 
50
-            return '['.implode(', ', array_map(function ($item, $key) use ($stringify) {
50
+            return '['.implode(', ', array_map(function($item, $key) use ($stringify) {
51 51
                 return (is_integer($key) ? $key : '"'.$key.'"').
52 52
                     ' => '.call_user_func($stringify, $item);
53 53
             }, $value, array_keys($value))).']';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $self = $this;
90 90
 
91
-        return implode(PHP_EOL, array_map(function (Call $call) use ($self) {
91
+        return implode(PHP_EOL, array_map(function(Call $call) use ($self) {
92 92
             return sprintf('  - %s(%s) @ %s',
93 93
                 $call->getMethodName(),
94 94
                 implode(', ', array_map(array($self, 'stringify'), $call->getArguments())),
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
         if (is_string($value)) {
140 140
             // Match for most non printable chars somewhat taking multibyte chars into account
141 141
             if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) {
142
-                return 'Binary String: 0x' . bin2hex($value);
142
+                return 'Binary String: 0x'.bin2hex($value);
143 143
             }
144 144
 
145
-            return "'" .
146
-            str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
145
+            return "'".
146
+            str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value).
147 147
             "'";
148 148
         }
149 149
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
         if (is_array($value)) {
157 157
             if (($key = $processed->contains($value)) !== false) {
158
-                return 'Array &' . $key;
158
+                return 'Array &'.$key;
159 159
             }
160 160
 
161 161
             $array  = $value;
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
             if (count($array) > 0) {
166 166
                 foreach ($array as $k => $v) {
167 167
                     $values .= sprintf(
168
-                        '%s    %s => %s' . "\n",
168
+                        '%s    %s => %s'."\n",
169 169
                         $whitespace,
170 170
                         self::recursiveExport($k, $indentation),
171 171
                         self::recursiveExport($value[$k], $indentation + 1, $processed)
172 172
                     );
173 173
                 }
174 174
 
175
-                $values = "\n" . $values . $whitespace;
175
+                $values = "\n".$values.$whitespace;
176 176
             }
177 177
 
178 178
             return sprintf('Array &%s (%s)', $key, $values);
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
             if (count($array) > 0) {
193 193
                 foreach ($array as $k => $v) {
194 194
                     $values .= sprintf(
195
-                        '%s    %s => %s' . "\n",
195
+                        '%s    %s => %s'."\n",
196 196
                         $whitespace,
197 197
                         self::recursiveExport($k, $indentation),
198 198
                         self::recursiveExport($v, $indentation + 1, $processed)
199 199
                     );
200 200
                 }
201 201
 
202
-                $values = "\n" . $values . $whitespace;
202
+                $values = "\n".$values.$whitespace;
203 203
             }
204 204
 
205 205
             return sprintf('%s:%s Object (%s)', $class, $hash, $values);
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
     public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null,
51 51
                                 NameGenerator $namer = null)
52 52
     {
53
-        $this->mirror  = $mirror  ?: new ClassMirror;
53
+        $this->mirror  = $mirror ?: new ClassMirror;
54 54
         $this->creator = $creator ?: new ClassCreator;
55
-        $this->namer   = $namer   ?: new NameGenerator;
55
+        $this->namer   = $namer ?: new NameGenerator;
56 56
     }
57 57
 
58 58
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $this->patches[] = $patch;
76 76
 
77
-        @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) {
77
+        @usort($this->patches, function(ClassPatchInterface $patch1, ClassPatchInterface $patch2) {
78 78
             return $patch2->getPriority() - $patch1->getPriority();
79 79
         });
80 80
     }
Please login to merge, or discard this patch.
phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,21 +54,21 @@
 block discarded – undo
54 54
         }
55 55
 
56 56
         if ($this->nodeIsDirectoryIterator($node)) {
57
-            $constructor->setCode('return parent::__construct("' . __DIR__ . '");');
57
+            $constructor->setCode('return parent::__construct("'.__DIR__.'");');
58 58
 
59 59
             return;
60 60
         }
61 61
 
62 62
         if ($this->nodeIsSplFileObject($node)) {
63
-            $filePath = str_replace('\\','\\\\',__FILE__);
64
-            $constructor->setCode('return parent::__construct("' . $filePath .'");');
63
+            $filePath = str_replace('\\', '\\\\', __FILE__);
64
+            $constructor->setCode('return parent::__construct("'.$filePath.'");');
65 65
 
66 66
             return;
67 67
         }
68 68
 
69 69
         if ($this->nodeIsSymfonySplFileInfo($node)) {
70
-            $filePath = str_replace('\\','\\\\',__FILE__);
71
-            $constructor->setCode('return parent::__construct("' . $filePath .'", "", "");');
70
+            $filePath = str_replace('\\', '\\\\', __FILE__);
71
+            $constructor->setCode('return parent::__construct("'.$filePath.'", "", "");');
72 72
 
73 73
             return;
74 74
         }
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     public function apply(ClassNode $node)
53 53
     {
54
-        $types = array_filter($node->getInterfaces(), function ($interface) {
54
+        $types = array_filter($node->getInterfaces(), function($interface) {
55 55
             return 0 !== strpos($interface, 'Prophecy\\');
56 56
         });
57 57
         $types[] = $node->getParentClass();
Please login to merge, or discard this patch.
phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $code = sprintf("class %s extends \%s implements %s {\n",
47 47
             $classname, $class->getParentClass(), implode(', ',
48
-                array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces())
48
+                array_map(function($interface) {return '\\'.$interface; }, $class->getInterfaces())
49 49
             )
50 50
         );
51 51
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $php = sprintf("%s %s function %s%s(%s)%s {\n",
68 68
             $method->getVisibility(),
69 69
             $method->isStatic() ? 'static' : '',
70
-            $method->returnsReference() ? '&':'',
70
+            $method->returnsReference() ? '&' : '',
71 71
             $method->getName(),
72 72
             implode(', ', $this->generateArguments($method->getArguments())),
73 73
             $this->getReturnType($method)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     private function generateArguments(array $arguments)
103 103
     {
104 104
         $typeHintReference = $this->typeHintReference;
105
-        return array_map(function (Node\ArgumentNode $argument) use ($typeHintReference) {
105
+        return array_map(function(Node\ArgumentNode $argument) use ($typeHintReference) {
106 106
             $php = '';
107 107
 
108 108
             if (version_compare(PHP_VERSION, '7.1', '>=')) {
Please login to merge, or discard this patch.
vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * @var MethodNode[]
31 31
      */
32
-    private $methods     = array();
32
+    private $methods = array();
33 33
 
34 34
     public function getParentClass()
35 35
     {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     public function addMethod(MethodNode $method, $force = false)
104 104
     {
105
-        if (!$this->isExtendable($method->getName())){
105
+        if (!$this->isExtendable($method->getName())) {
106 106
             $message = sprintf(
107 107
                 'Method `%s` is not extendable, so can not be added.', $method->getName()
108 108
             );
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function addUnextendableMethod($unextendableMethod)
154 154
     {
155
-        if (!$this->isExtendable($unextendableMethod)){
155
+        if (!$this->isExtendable($unextendableMethod)) {
156 156
             return;
157 157
         }
158 158
         $this->unextendableMethods[] = $unextendableMethod;
Please login to merge, or discard this patch.