File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 2828 "php" : " >=7.1.0"
2929 },
3030 "require-dev" : {
31- "phpstan/phpstan" : " 1.10.39 || 1.4.10" ,
31+ "phpstan/phpstan" : " 1.12.19 || 1.4.10" ,
3232 "phpunit/phpunit" : " ^9.6 || ^7.5"
3333 },
3434 "autoload" : {
Original file line number Diff line number Diff line change @@ -56,9 +56,14 @@ public function catch(callable $onRejected): PromiseInterface
5656 return $ this ;
5757 }
5858
59+ /**
60+ * @param callable(): (void|PromiseInterface<void>) $onFulfilledOrRejected
61+ * @return PromiseInterface<T>
62+ */
5963 public function finally (callable $ onFulfilledOrRejected ): PromiseInterface
6064 {
6165 return $ this ->then (function ($ value ) use ($ onFulfilledOrRejected ): PromiseInterface {
66+ /** @var T $value */
6267 return resolve ($ onFulfilledOrRejected ())->then (function () use ($ value ) {
6368 return $ value ;
6469 });
Original file line number Diff line number Diff line change @@ -94,9 +94,14 @@ public function catch(callable $onRejected): PromiseInterface
9494 });
9595 }
9696
97+ /**
98+ * @param callable(): (void|PromiseInterface<void>) $onFulfilledOrRejected
99+ * @return PromiseInterface<T>
100+ */
97101 public function finally (callable $ onFulfilledOrRejected ): PromiseInterface
98102 {
99103 return $ this ->then (static function ($ value ) use ($ onFulfilledOrRejected ): PromiseInterface {
104+ /** @var T $value */
100105 return resolve ($ onFulfilledOrRejected ())->then (function () use ($ value ) {
101106 return $ value ;
102107 });
You can’t perform that action at this time.
0 commit comments