|
16 | 16 |
|
17 | 17 | $newThis = new \stdClass(); |
18 | 18 | $bound = $foo->bindTo($newThis); |
19 | | -assertType('((Closure(): void)|null)', $bound); |
| 19 | +assertType('Closure(): void', $bound); |
20 | 20 |
|
21 | 21 | $staticBound = Closure::bind($foo, $newThis); |
22 | | -assertType('((Closure(): void)|null)', $staticBound); |
| 22 | +assertType('Closure(): void', $staticBound); |
23 | 23 |
|
24 | 24 | $bound2 = $foo->bindTo($newThis, 'stdClass'); |
25 | | -assertType('((Closure(): void)|null)', $bound2); |
| 25 | +assertType('Closure(): void', $bound2); |
26 | 26 |
|
27 | 27 | $static = static function (): void {}; |
28 | 28 | $boundStatic = $static->bindTo($newThis); |
|
31 | 31 | $boundStaticNull = $static->bindTo(null); |
32 | 32 | assertType('Closure(): void', $boundStaticNull); |
33 | 33 |
|
| 34 | +$staticBound2 = Closure::bind($static, $newThis); |
| 35 | +assertType('((Closure(): void)|null)', $staticBound2); |
| 36 | + |
| 37 | +$staticBoundNull = Closure::bind($static, null); |
| 38 | +assertType('Closure(): void', $staticBoundNull); |
| 39 | + |
34 | 40 | /** @var \stdClass|null $maybeNull */ |
35 | 41 | $maybeNull = null; |
36 | 42 | $boundMaybe = $foo->bindTo($maybeNull); |
37 | | -assertType('((Closure(): void)|null)', $boundMaybe); |
| 43 | +assertType('Closure(): void', $boundMaybe); |
| 44 | + |
| 45 | +$staticBoundMaybe = $static->bindTo($maybeNull); |
| 46 | +assertType('((Closure(): void)|null)', $staticBoundMaybe); |
0 commit comments