@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $method3->hasReturnType()->willReturn(false); |
60 | 60 | } |
61 | 61 | |
62 | - $classNode = $this->reflect($class, array()); |
|
62 | + $classNode = $this->reflect($class, array()); |
|
63 | 63 | $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); |
64 | 64 | $classNode->getParentClass()->shouldReturn('Custom\ClassName'); |
65 | 65 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $method->hasReturnType()->willReturn(false); |
135 | 135 | } |
136 | 136 | |
137 | - $classNode = $this->reflect($class, array()); |
|
137 | + $classNode = $this->reflect($class, array()); |
|
138 | 138 | $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); |
139 | 139 | $classNode->getParentClass()->shouldReturn('Custom\ClassName'); |
140 | 140 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $method->hasReturnType()->willReturn(false); |
167 | 167 | } |
168 | 168 | |
169 | - $classNode = $this->reflect($class, array()); |
|
169 | + $classNode = $this->reflect($class, array()); |
|
170 | 170 | $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); |
171 | 171 | $classNode->getParentClass()->shouldReturn('Custom\ClassName'); |
172 | 172 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public function getMatchers() |
65 | 65 | { |
66 | 66 | return array( |
67 | - 'startWith' => function ($subject, $string) { |
|
67 | + 'startWith' => function($subject, $string) { |
|
68 | 68 | return 0 === strpos($subject, $string); |
69 | 69 | }, |
70 | 70 | ); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | function it_proxies_call_to_callback($object, $method, $call) |
27 | 27 | { |
28 | - $returnFirstCallCallback = function ($calls, $object, $method) { |
|
28 | + $returnFirstCallCallback = function($calls, $object, $method) { |
|
29 | 29 | throw new RuntimeException; |
30 | 30 | }; |
31 | 31 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | function it_should_execute_closure_callback($object, $method) |
24 | 24 | { |
25 | - $firstArgumentCallback = function ($args) { |
|
25 | + $firstArgumentCallback = function($args) { |
|
26 | 26 | return $args[0]; |
27 | 27 | }; |
28 | 28 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | $objectProphecy->addMethodProphecy($this)->willReturn(null); |
126 | 126 | |
127 | - $callback = function () {}; |
|
127 | + $callback = function() {}; |
|
128 | 128 | |
129 | 129 | $this->will($callback); |
130 | 130 | $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\CallbackPromise'); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | { |
146 | 146 | $objectProphecy->addMethodProphecy($this)->willReturn(null); |
147 | 147 | |
148 | - $callback = function () {}; |
|
148 | + $callback = function() {}; |
|
149 | 149 | |
150 | 150 | $this->callOnWrappedObject('should', array($callback)); |
151 | 151 | $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallbackPrediction'); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $objectProphecy, $arguments, $prediction, $call1, $call2 |
306 | 306 | ) |
307 | 307 | { |
308 | - $callback = function ($calls, $object, $method) { |
|
308 | + $callback = function($calls, $object, $method) { |
|
309 | 309 | throw new \RuntimeException; |
310 | 310 | }; |
311 | 311 | $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); |
@@ -295,8 +295,8 @@ |
||
295 | 295 | { |
296 | 296 | $doubler->double(Argument::any())->willReturn($reflection); |
297 | 297 | |
298 | - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function(){})); |
|
299 | - $methodProphecy2 = $this->getProphecy(function(){}); |
|
298 | + $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function() {})); |
|
299 | + $methodProphecy2 = $this->getProphecy(function() {}); |
|
300 | 300 | |
301 | 301 | $methodProphecy2->shouldNotBe($methodProphecy1); |
302 | 302 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | function it_generates_proper_string_representation_for_resource() |
67 | 67 | { |
68 | 68 | $resource = fopen(__FILE__, 'r'); |
69 | - $this->stringify($resource)->shouldReturn('stream:'.$resource); |
|
69 | + $this->stringify($resource)->shouldReturn('stream:' . $resource); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -83,7 +83,7 @@ |
||
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 | } |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | return false; |
59 | 59 | } |
60 | 60 | |
61 | - $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); |
|
62 | - $valueScores = array_map(array($this->value,'scoreArgument'), $argument); |
|
63 | - $scoreEntry = function ($value, $key) { |
|
61 | + $keyScores = array_map(array($this->key, 'scoreArgument'), array_keys($argument)); |
|
62 | + $valueScores = array_map(array($this->value, 'scoreArgument'), $argument); |
|
63 | + $scoreEntry = function($value, $key) { |
|
64 | 64 | return $value && $key ? min(8, ($key + $value) / 2) : false; |
65 | 65 | }; |
66 | 66 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | if (!$this->key instanceof ExactValueToken) { |
132 | 132 | throw new InvalidArgumentException(sprintf( |
133 | - 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. |
|
133 | + 'You can only use exact value tokens to match key of ArrayAccess object' . PHP_EOL . |
|
134 | 134 | 'But you used `%s`.', |
135 | 135 | $this->key |
136 | 136 | )); |