@@ -207,7 +207,7 @@ |
||
| 207 | 207 | $this->markTestSkipped('"data" URIs for includes are required.'); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - include 'data:text/plain;base64,'. base64_encode( |
|
| 210 | + include 'data:text/plain;base64,' . base64_encode( |
|
| 211 | 211 | <<<DOCBLOCK_EXTENSION |
| 212 | 212 | <?php |
| 213 | 213 | class MyReflectionDocBlock extends \phpDocumentor\Reflection\DocBlock { |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | function it_scores_6_if_argument_array_has_proper_count() |
| 25 | 25 | { |
| 26 | - $this->scoreArgument(array(1,2))->shouldReturn(6); |
|
| 26 | + $this->scoreArgument(array(1, 2))->shouldReturn(6); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) |
| 76 | 76 | { |
| 77 | - $object->current()->will(function () use ($object) { |
|
| 77 | + $object->current()->will(function() use ($object) { |
|
| 78 | 78 | $object->valid()->willReturn(false); |
| 79 | 79 | |
| 80 | 80 | return 'value'; |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken($key, $value, $object) |
| 97 | 97 | { |
| 98 | 98 | $key->__toString()->willReturn('any_token'); |
| 99 | - $this->beConstructedWith($key,$value); |
|
| 100 | - $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. |
|
| 99 | + $this->beConstructedWith($key, $value); |
|
| 100 | + $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object' . PHP_EOL . |
|
| 101 | 101 | 'But you used `any_token`.'; |
| 102 | 102 | $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object); |
| 103 | 103 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible($key, $value, $object) |
| 126 | 126 | { |
| 127 | 127 | $this->beConstructedWith($key, $value); |
| 128 | - $object->current()->will(function () use ($object) { |
|
| 128 | + $object->current()->will(function() use ($object) { |
|
| 129 | 129 | $object->valid()->willReturn(false); |
| 130 | 130 | |
| 131 | 131 | return 'value'; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object) |
| 178 | 178 | { |
| 179 | 179 | $object->current()->willReturn('foo'); |
| 180 | - $object->current()->will(function () use ($object) { |
|
| 180 | + $object->current()->will(function() use ($object) { |
|
| 181 | 181 | $object->valid()->willReturn(false); |
| 182 | 182 | |
| 183 | 183 | return 'bar'; |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | */ |
| 95 | 95 | function it_scores_traversable_object_from_value_token($value, $object) |
| 96 | 96 | { |
| 97 | - $object->current()->will(function ($args, $object) { |
|
| 97 | + $object->current()->will(function($args, $object) { |
|
| 98 | 98 | $object->valid()->willReturn(false); |
| 99 | 99 | |
| 100 | 100 | return 'value'; |
@@ -23,14 +23,14 @@ |
||
| 23 | 23 | |
| 24 | 24 | function it_scores_7_if_argument_matches_callback() |
| 25 | 25 | { |
| 26 | - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); |
|
| 26 | + $this->beConstructedWith(function($argument) { return 2 === $argument; }); |
|
| 27 | 27 | |
| 28 | 28 | $this->scoreArgument(2)->shouldReturn(7); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | function it_does_not_scores_if_argument_does_not_match_callback() |
| 32 | 32 | { |
| 33 | - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); |
|
| 33 | + $this->beConstructedWith(function($argument) { return 2 === $argument; }); |
|
| 34 | 34 | |
| 35 | 35 | $this->scoreArgument(5)->shouldReturn(false); |
| 36 | 36 | } |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | { |
| 121 | 121 | $resource = fopen(__FILE__, 'r'); |
| 122 | 122 | $this->beConstructedWith($resource); |
| 123 | - $this->__toString()->shouldReturn('exact(stream:'.$resource.')'); |
|
| 123 | + $this->__toString()->shouldReturn('exact(stream:' . $resource . ')'); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | { |
| 137 | 137 | $resource = fopen(__FILE__, 'r'); |
| 138 | 138 | $this->beConstructedWith($resource); |
| 139 | - $this->__toString()->shouldReturn('identical(stream:'.$resource.')'); |
|
| 139 | + $this->__toString()->shouldReturn('identical(stream:' . $resource . ')'); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | function it_generates_proper_string_representation_for_object($object) |
@@ -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 | } |
@@ -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 | } |