File tree Expand file tree Collapse file tree 6 files changed +33
-2
lines changed Expand file tree Collapse file tree 6 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 6060 run : |
6161 wget https://scrutinizer-ci.com/ocular.phar
6262 php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml
63+
64+ phpstan :
65+ name : PHPStan
66+ runs-on : ubuntu-latest
67+
68+ steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v3
71+
72+ - name : PHPStan
73+ uses : OskarStark/phpstan-ga@0.12.32
74+ env :
75+ REQUIRE_DEV : false
76+ with :
77+ args : analyze --no-progress
Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## 1.2.1
4+
5+ ### Added
6+
7+ - Fixed PHPDoc for ` wait() ` and ` then() ` 's ` onRejected ` callable
8+
39## 1.2.0 - 2023-10-24
410
511### Added
Original file line number Diff line number Diff line change 1+ parameters:
2+ level: max
3+ checkMissingIterableValueType: false
4+ treatPhpDocTypesAsCertain: false
5+ paths:
6+ - src
Original file line number Diff line number Diff line change @@ -58,5 +58,7 @@ public function wait($unwrap = true)
5858 if ($ unwrap ) {
5959 return $ this ->result ;
6060 }
61+
62+ return ;
6163 }
6264}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ interface Promise
3939 * The callback will be called when the value arrived and never more than once.
4040 *
4141 * @param callable(T): V|null $onFulfilled called when a response will be available
42- * @param callable(\Exception ): V|null $onRejected called when an exception occurs
42+ * @param callable(\Throwable ): V|null $onRejected called when an exception occurs
4343 *
4444 * @return Promise<V> a new resolved promise with value of the executed callback (onFulfilled / onRejected)
4545 *
@@ -65,7 +65,7 @@ public function getState();
6565 *
6666 * @param bool $unwrap Whether to return resolved value / throw reason or not
6767 *
68- * @return T Resolved value, null if $unwrap is set to false
68+ * @return ($unwrap is true ? T : null) Resolved value, null if $unwrap is set to false
6969 *
7070 * @throws \Exception the rejection reason if $unwrap is set to true and the request failed
7171 */
Original file line number Diff line number Diff line change @@ -55,5 +55,7 @@ public function wait($unwrap = true)
5555 if ($ unwrap ) {
5656 throw $ this ->exception ;
5757 }
58+
59+ return ;
5860 }
5961}
You can’t perform that action at this time.
0 commit comments