Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Oct 4, 2014
1 parent 8b7e0f0 commit d5b6f8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/LazyPromise.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private function promise()
$this->promise = new RejectedPromise($exception);
}
}

return $this->promise;
}
}
2 changes: 1 addition & 1 deletion src/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function then(callable $onFulfilled = null, callable $onRejected = null,

$this->requiredCancelRequests++;

return new static($this->resolver($onFulfilled, $onRejected, $onProgress), function($resolve, $reject, $progress) {
return new static($this->resolver($onFulfilled, $onRejected, $onProgress), function ($resolve, $reject, $progress) {
if (++$this->cancelRequests < $this->requiredCancelRequests) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions tests/PromiseTest/CancelTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function cancelShouldCallCancellerOnlyOnceIfCancellerResolves()
$mock
->expects($this->once())
->method('__invoke')
->will($this->returnCallback(function($resolve) {
->will($this->returnCallback(function ($resolve) {
$resolve();
}));

Expand Down Expand Up @@ -144,15 +144,15 @@ public function cancelShouldCallCancellerFromDeepNestedPromiseChain()

$promise = $adapter->promise()
->then(function () {
return new Promise\Promise(function() {});
return new Promise\Promise(function () {});
})
->then(function() {
->then(function () {
$d = new Promise\Deferred();

return $d->promise();
})
->then(function () {
return new Promise\Promise(function() {});
return new Promise\Promise(function () {});
});

$promise->cancel();
Expand Down

0 comments on commit d5b6f8e

Please sign in to comment.