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 60
60
run : |
61
61
wget https://scrutinizer-ci.com/ocular.phar
62
62
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 1
1
# Change Log
2
2
3
+ ## 1.2.1
4
+
5
+ ### Added
6
+
7
+ - Fixed PHPDoc for ` wait() ` and ` then() ` 's ` onRejected ` callable
8
+
3
9
## 1.2.0 - 2023-10-24
4
10
5
11
### 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)
58
58
if ($ unwrap ) {
59
59
return $ this ->result ;
60
60
}
61
+
62
+ return ;
61
63
}
62
64
}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ interface Promise
39
39
* The callback will be called when the value arrived and never more than once.
40
40
*
41
41
* @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
43
43
*
44
44
* @return Promise<V> a new resolved promise with value of the executed callback (onFulfilled / onRejected)
45
45
*
@@ -65,7 +65,7 @@ public function getState();
65
65
*
66
66
* @param bool $unwrap Whether to return resolved value / throw reason or not
67
67
*
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
69
69
*
70
70
* @throws \Exception the rejection reason if $unwrap is set to true and the request failed
71
71
*/
Original file line number Diff line number Diff line change @@ -55,5 +55,7 @@ public function wait($unwrap = true)
55
55
if ($ unwrap ) {
56
56
throw $ this ->exception ;
57
57
}
58
+
59
+ return ;
58
60
}
59
61
}
You can’t perform that action at this time.
0 commit comments