@@ -148,6 +148,9 @@ |
||
| 148 | 148 | public $errors; |
| 149 | 149 | public $value = null; |
| 150 | 150 | |
| 151 | + /** |
|
| 152 | + * @param string $value |
|
| 153 | + */ |
|
| 151 | 154 | public function __construct($value) |
| 152 | 155 | { |
| 153 | 156 | $this->value = $value; |
@@ -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\Comparator; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | 6 | use Prophecy\Prophet; |
| 8 | 7 | |
| 9 | 8 | class ProphecyComparatorSpec extends ObjectBehavior |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | $this->accepts('string', 'string')->shouldReturn(false); |
| 20 | 20 | $this->accepts(false, true)->shouldReturn(false); |
| 21 | 21 | $this->accepts(true, false)->shouldReturn(false); |
| 22 | - $this->accepts((object)array(), (object)array())->shouldReturn(false); |
|
| 23 | - $this->accepts(function(){}, (object)array())->shouldReturn(false); |
|
| 24 | - $this->accepts(function(){}, function(){})->shouldReturn(false); |
|
| 22 | + $this->accepts((object) array(), (object) array())->shouldReturn(false); |
|
| 23 | + $this->accepts(function() {}, (object) array())->shouldReturn(false); |
|
| 24 | + $this->accepts(function() {}, function() {})->shouldReturn(false); |
|
| 25 | 25 | |
| 26 | 26 | $prophet = new Prophet(); |
| 27 | 27 | $prophecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy'); |
@@ -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 | { |