-
-
Notifications
You must be signed in to change notification settings - Fork 150
Update PHPStan and fix type annotations #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -56,9 +56,14 @@ public function catch(callable $onRejected): PromiseInterface | |||||||||
return $this; | ||||||||||
} | ||||||||||
|
||||||||||
/** | ||||||||||
* @param callable(): (void|PromiseInterface<void>) $onFulfilledOrRejected | ||||||||||
* @return PromiseInterface<T> | ||||||||||
*/ | ||||||||||
Comment on lines
+59
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested this locally and this doesn't appear to be needed, as its types would be inherited directly from the
Suggested change
May I ask you do confirm? |
||||||||||
public function finally(callable $onFulfilledOrRejected): PromiseInterface | ||||||||||
{ | ||||||||||
return $this->then(function ($value) use ($onFulfilledOrRejected): PromiseInterface { | ||||||||||
/** @var T $value */ | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Mixed whitespace, should use spaces only
Suggested change
|
||||||||||
return resolve($onFulfilledOrRejected())->then(function () use ($value) { | ||||||||||
return $value; | ||||||||||
}); | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -94,9 +94,14 @@ public function catch(callable $onRejected): PromiseInterface | |||||||||
}); | ||||||||||
} | ||||||||||
|
||||||||||
/** | ||||||||||
* @param callable(): (void|PromiseInterface<void>) $onFulfilledOrRejected | ||||||||||
* @return PromiseInterface<T> | ||||||||||
*/ | ||||||||||
Comment on lines
+97
to
+100
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested this locally and this doesn't appear to be needed, as its types would be inherited directly from the
Suggested change
May I ask you do confirm? |
||||||||||
public function finally(callable $onFulfilledOrRejected): PromiseInterface | ||||||||||
{ | ||||||||||
return $this->then(static function ($value) use ($onFulfilledOrRejected): PromiseInterface { | ||||||||||
/** @var T $value */ | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Mixed whitespace, should use spaces only
Suggested change
|
||||||||||
return resolve($onFulfilledOrRejected())->then(function () use ($value) { | ||||||||||
return $value; | ||||||||||
}); | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulRotmann This is quite old, are you sure we don't want to go to 1.12.28 at least?