@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Doubler\ClassPatch; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class HhvmExceptionPatchSpec extends ObjectBehavior |
9 | 8 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Doubler\ClassPatch; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | use Prophecy\Doubler\Generator\Node\MethodNode; |
8 | 7 | |
9 | 8 | class KeywordPatchSpec extends ObjectBehavior |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Doubler\ClassPatch; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | use Prophecy\Doubler\Generator\Node\MethodNode; |
8 | 7 | |
9 | 8 | class MagicCallPatchSpec extends ObjectBehavior |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Doubler\ClassPatch; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class ReflectionClassNewInstancePatchSpec extends ObjectBehavior |
9 | 8 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Doubler; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | |
8 | 7 | class DoublerSpec extends ObjectBehavior |
9 | 8 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | 6 | use I\Simply; |
7 | - |
|
8 | 7 | use ReflectionClass; |
9 | 8 | use ReflectionMethod; |
10 | 9 | use ReflectionParameter; |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | $class->getName()->willReturn('Custom\ClassName'); |
389 | 389 | |
390 | 390 | $this->shouldThrow('Prophecy\Exception\Doubler\ClassMirrorException') |
391 | - ->duringReflect($class, array()); |
|
391 | + ->duringReflect($class, array()); |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $interface->getName()->willReturn('Custom\ClassName'); |
420 | 420 | |
421 | 421 | $this->shouldThrow('Prophecy\Exception\InvalidArgumentException') |
422 | - ->duringReflect($interface, array()); |
|
422 | + ->duringReflect($interface, array()); |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | /** |
@@ -562,13 +562,13 @@ discard block |
||
562 | 562 | $class->isInterface()->willReturn(false); |
563 | 563 | |
564 | 564 | $this->shouldThrow('InvalidArgumentException') |
565 | - ->duringReflect(null, array($class)); |
|
565 | + ->duringReflect(null, array($class)); |
|
566 | 566 | } |
567 | 567 | |
568 | 568 | function it_throws_an_exception_if_not_reflection_provided_as_interface() |
569 | 569 | { |
570 | 570 | $this->shouldThrow('InvalidArgumentException') |
571 | - ->duringReflect(null, array(null)); |
|
571 | + ->duringReflect(null, array(null)); |
|
572 | 572 | } |
573 | 573 | |
574 | 574 | function it_doesnt_fail_to_typehint_nonexistent_FQCN() |
@@ -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 |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Prediction; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | - |
|
7 | 6 | use RuntimeException; |
8 | 7 | |
9 | 8 | class CallbackPredictionSpec extends ObjectBehavior |
@@ -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 |
@@ -312,6 +312,9 @@ |
||
312 | 312 | public $errors; |
313 | 313 | public $value = null; |
314 | 314 | |
315 | + /** |
|
316 | + * @param string $value |
|
317 | + */ |
|
315 | 318 | public function __construct($value) |
316 | 319 | { |
317 | 320 | $this->value = $value; |
@@ -304,7 +304,7 @@ |
||
304 | 304 | |
305 | 305 | class ObjectProphecySpecFixtureA |
306 | 306 | { |
307 | - public $errors; |
|
307 | + public $errors; |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA |
@@ -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 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | /** |
46 | 46 | * Scores 10 if argument matches preset value. |
47 | 47 | * |
48 | - * @param $argument |
|
48 | + * @param string $argument |
|
49 | 49 | * |
50 | 50 | * @return bool|int |
51 | 51 | */ |