@@ -27,11 +27,11 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | return array( |
| 29 | 29 | new Deferred(), |
| 30 | - function () { |
|
| 30 | + function() { |
|
| 31 | 31 | }, |
| 32 | - function () { |
|
| 32 | + function() { |
|
| 33 | 33 | }, |
| 34 | - function () { |
|
| 34 | + function() { |
|
| 35 | 35 | }, |
| 36 | 36 | ); |
| 37 | 37 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function testConstruct() |
| 43 | 43 | { |
| 44 | 44 | $this |
| 45 | - ->exception(function () { |
|
| 45 | + ->exception(function() { |
|
| 46 | 46 | $deferred = new Deferred(); |
| 47 | 47 | $deferred->resolve(); |
| 48 | 48 | $this->newTestedInstance($deferred); |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | $deferred = $this->newTestedInstance( |
| 67 | 67 | new Deferred(), |
| 68 | 68 | null, |
| 69 | - function () use ($reason) { |
|
| 69 | + function() use ($reason) { |
|
| 70 | 70 | throw $reason; |
| 71 | 71 | } |
| 72 | 72 | ) |
| 73 | 73 | ) |
| 74 | - ->when(function () use ($deferred, $onRejected) { |
|
| 74 | + ->when(function() use ($deferred, $onRejected) { |
|
| 75 | 75 | $deferred->promise()->then(null, $onRejected); |
| 76 | 76 | $deferred->reject('foo'); |
| 77 | 77 | }) |
@@ -179,8 +179,8 @@ |
||
| 179 | 179 | ->delegateCall($onFulfilledThen) |
| 180 | 180 | ->never() |
| 181 | 181 | ->delegateCall($onRejectedThen) |
| 182 | - ->withArguments($e) |
|
| 183 | - ->once(); |
|
| 182 | + ->withArguments($e) |
|
| 183 | + ->once(); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | public function testConstructor() |
| 47 | 47 | { |
| 48 | 48 | $this |
| 49 | - ->exception(function () { |
|
| 49 | + ->exception(function() { |
|
| 50 | 50 | $this->newTestedInstance( |
| 51 | 51 | Factory::create(), |
| 52 | 52 | $this->delegateMock(), |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | ) |
| 71 | 71 | /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */ |
| 72 | 72 | ->let($timer = $this->newTestedInstance($loop, $task, 0.001)) |
| 73 | - ->when(function () use ($loop, $timer, $onFulfilled) { |
|
| 73 | + ->when(function() use ($loop, $timer, $onFulfilled) { |
|
| 74 | 74 | $timer->then($onFulfilled); |
| 75 | 75 | $loop->run(); |
| 76 | 76 | }) |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */ |
| 99 | 99 | ->let($timer = $this->newTestedInstance($loop, $task, 0.001, true, 2)) |
| 100 | 100 | /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */ |
| 101 | - ->when(function () use ($loop, $timer, $onRejected, $onNotify) { |
|
| 101 | + ->when(function() use ($loop, $timer, $onRejected, $onNotify) { |
|
| 102 | 102 | $timer->then(null, $onRejected, $onNotify); |
| 103 | 103 | $loop->run(); |
| 104 | 104 | }) |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | return array( |
| 122 | 122 | Factory::create(), |
| 123 | - function () { |
|
| 123 | + function() { |
|
| 124 | 124 | return 'foo'; |
| 125 | 125 | }, |
| 126 | 126 | 0.001, |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | { |
| 137 | 137 | $timeout = $this->newTestedInstance( |
| 138 | 138 | $loop = Factory::create(), |
| 139 | - function () { |
|
| 139 | + function() { |
|
| 140 | 140 | return $this->defaultResolveValue(); |
| 141 | 141 | }, |
| 142 | 142 | 0.001 |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $timer = $this->newTestedInstance( |
| 147 | 147 | $loop = Factory::create(), |
| 148 | - function () { |
|
| 148 | + function() { |
|
| 149 | 149 | throw $this->defaultRejectReason(); |
| 150 | 150 | }, |
| 151 | 151 | 0.001, |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $this |
| 95 | 95 | ->given($onFulfilled = $this->delegateMock()) |
| 96 | - ->when(function () use ($loop, $timer, $onFulfilled) { |
|
| 96 | + ->when(function() use ($loop, $timer, $onFulfilled) { |
|
| 97 | 97 | $timer->then($onFulfilled); |
| 98 | 98 | $loop->tick(); |
| 99 | 99 | }) |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $onRejected = $this->delegateMock(), |
| 140 | 140 | $onNotify = $this->delegateMock() |
| 141 | 141 | ) |
| 142 | - ->when(function () use ($loop, $timer, $onRejected, $onNotify) { |
|
| 142 | + ->when(function() use ($loop, $timer, $onRejected, $onNotify) { |
|
| 143 | 143 | $timer->then(null, $onRejected, $onNotify); |
| 144 | 144 | $loop->run(); |
| 145 | 145 | }) |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | $this |
| 220 | 220 | ->given($onFulfilled = $this->delegateMock()) |
| 221 | - ->when(function () use ($loop, $promise, $onFulfilled) { |
|
| 221 | + ->when(function() use ($loop, $promise, $onFulfilled) { |
|
| 222 | 222 | $promise->then($onFulfilled); |
| 223 | 223 | $loop->tick(); |
| 224 | 224 | }) |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $this->task = new Delegate($task); |
| 74 | 74 | $this->iterations = 0; |
| 75 | - $onTick = function () { |
|
| 75 | + $onTick = function() { |
|
| 76 | 76 | $this->onTick(); |
| 77 | 77 | }; |
| 78 | 78 | if ($periodic) { |