@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace spec\Prophecy\Comparator; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | 6 | |
| 8 | 7 | class ClosureComparatorSpec extends ObjectBehavior |
| 9 | 8 | { |
@@ -18,21 +18,21 @@ |
||
| 18 | 18 | $this->accepts('string', 'string')->shouldReturn(false); |
| 19 | 19 | $this->accepts(false, true)->shouldReturn(false); |
| 20 | 20 | $this->accepts(true, false)->shouldReturn(false); |
| 21 | - $this->accepts((object)array(), (object)array())->shouldReturn(false); |
|
| 22 | - $this->accepts(function(){}, (object)array())->shouldReturn(false); |
|
| 23 | - $this->accepts(function(){}, (object)array())->shouldReturn(false); |
|
| 21 | + $this->accepts((object) array(), (object) array())->shouldReturn(false); |
|
| 22 | + $this->accepts(function() {}, (object) array())->shouldReturn(false); |
|
| 23 | + $this->accepts(function() {}, (object) array())->shouldReturn(false); |
|
| 24 | 24 | |
| 25 | - $this->accepts(function(){}, function(){})->shouldReturn(true); |
|
| 25 | + $this->accepts(function() {}, function() {})->shouldReturn(true); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | function it_asserts_that_all_closures_are_different() |
| 29 | 29 | { |
| 30 | - $this->shouldThrow()->duringAssertEquals(function(){}, function(){}); |
|
| 30 | + $this->shouldThrow()->duringAssertEquals(function() {}, function() {}); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | function it_asserts_that_all_closures_are_different_even_if_its_the_same_closure() |
| 34 | 34 | { |
| 35 | - $closure = function(){}; |
|
| 35 | + $closure = function() {}; |
|
| 36 | 36 | |
| 37 | 37 | $this->shouldThrow()->duringAssertEquals($closure, $closure); |
| 38 | 38 | } |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace spec\Prophecy\Comparator; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | 6 | |
| 8 | 7 | class FactorySpec extends ObjectBehavior |
| 9 | 8 | { |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | function it_should_have_ClosureComparator_registered() |
| 16 | 16 | { |
| 17 | - $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){}); |
|
| 17 | + $comparator = $this->getInstance()->getComparatorFor(function() {}, function() {}); |
|
| 18 | 18 | $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -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; |
@@ -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 | |