@@ -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 | ); |
@@ -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 |
@@ -289,7 +289,7 @@ |
||
289 | 289 | $this->withArguments($arguments); |
290 | 290 | |
291 | 291 | try { |
292 | - $this->callOnWrappedObject('shouldHave', array($prediction)); |
|
292 | + $this->callOnWrappedObject('shouldHave', array($prediction)); |
|
293 | 293 | } catch (\Exception $e) {} |
294 | 294 | |
295 | 295 | $this->getCheckedPredictions()->shouldReturn(array($prediction)); |
@@ -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)); |
@@ -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 | )); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function __construct($value) |
28 | 28 | { |
29 | - $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); |
|
29 | + $this->token = $value instanceof TokenInterface ? $value : new ExactValueToken($value); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | $tagList = $phpdoc->getTagsByName('method'); |
50 | 50 | |
51 | - foreach($tagList as $tag) { |
|
51 | + foreach ($tagList as $tag) { |
|
52 | 52 | $methodName = $tag->getMethodName(); |
53 | 53 | |
54 | 54 | if (!$reflectionClass->hasMethod($methodName)) { |
@@ -50,9 +50,9 @@ discard block |
||
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 |
||
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 | } |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | foreach ($interfaces as $interface) { |
96 | 96 | if (!$interface instanceof ReflectionClass) { |
97 | 97 | throw new InvalidArgumentException(sprintf( |
98 | - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". |
|
98 | + "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n" . |
|
99 | 99 | "a second argument to `Doubler::double(...)`, but got %s.", |
100 | - is_object($interface) ? get_class($interface).' class' : gettype($interface) |
|
100 | + is_object($interface) ? get_class($interface) . ' class' : gettype($interface) |
|
101 | 101 | )); |
102 | 102 | } |
103 | 103 | } |