Skip to content

Commit e2fbf51

Browse files
committed
Update PHPStan
1 parent baf9ab5 commit e2fbf51

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"php": ">=7.1.0"
2929
},
3030
"require-dev": {
31-
"phpstan/phpstan": "1.10.20 || 1.4.10",
31+
"phpstan/phpstan": "1.10.32",
3232
"phpunit/phpunit": "^9.5 || ^7.5"
3333
},
3434
"autoload": {

tests/types/reject.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use function React\Promise\reject;
66
use function React\Promise\resolve;
77

8-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException()));
9-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->then(null, null));
10-
// assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->then(function (): int {
8+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException()));
9+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->then(null, null));
10+
// assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->then(function (): int {
1111
// return 42;
1212
// }));
1313
assertType('React\Promise\PromiseInterface<int>', reject(new RuntimeException())->then(null, function (): int {
@@ -32,11 +32,11 @@
3232
return resolve(42);
3333
}));
3434

35-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->finally(function (): void { }));
36-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->finally(function (): never {
35+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->finally(function (): void { }));
36+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->finally(function (): never {
3737
throw new \UnexpectedValueException();
3838
}));
39-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->finally(function (): PromiseInterface {
39+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->finally(function (): PromiseInterface {
4040
return reject(new \UnexpectedValueException());
4141
}));
4242

@@ -50,10 +50,10 @@
5050
return resolve(42);
5151
}));
5252

53-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->always(function (): void { }));
54-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->always(function (): never {
53+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->always(function (): void { }));
54+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->always(function (): never {
5555
throw new \UnexpectedValueException();
5656
}));
57-
assertType('React\Promise\PromiseInterface<*NEVER*>', reject(new RuntimeException())->always(function (): PromiseInterface {
57+
assertType('React\Promise\PromiseInterface<never>', reject(new RuntimeException())->always(function (): PromiseInterface {
5858
return reject(new \UnexpectedValueException());
5959
}));

0 commit comments

Comments
 (0)