Skip to content

Commit f00e6ea

Browse files
committed
Use stubs from stubs package
1 parent e970d8c commit f00e6ea

File tree

8 files changed

+689
-772
lines changed

8 files changed

+689
-772
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"wyrihaximus/constants": "^1.6"
1919
},
2020
"require-dev": {
21+
"react-parallel/stubs": "^1@dev",
2122
"wyrihaximus/async-test-utilities": "^5 || ^7.2",
2223
"wyrihaximus/ticking-promise": "^3"
2324
},

composer.lock

Lines changed: 675 additions & 583 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/qa/phpstan.neon

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ parameters:
44
-
55
message: '#Result of method ReactParallel\\Runtime\\Runtime::run\(\) \(void\) is used.#'
66
path: ../../tests/Types.php
7-
ergebnis:
8-
noExtends:
9-
classesAllowedToBeExtended:
10-
- ReactParallel\EventLoop\CancelledException
11-
- ReactParallel\EventLoop\CanceledFuture
12-
- ReactParallel\EventLoop\KilledRuntime
13-
stubFiles:
14-
- ../../stubs/Event.stub
15-
- ../../stubs/Future.stub
16-
- ../../stubs/Channel.stub
17-
18-
includes:
19-
- ../../vendor/wyrihaximus/async-test-utilities/rules.neon
7+
# ergebnis:
8+
# noExtends:
9+
# classesAllowedToBeExtended:
10+
# - ReactParallel\EventLoop\CancelledException
11+
# - ReactParallel\EventLoop\CanceledFuture
12+
# - ReactParallel\EventLoop\KilledRuntime
13+
#
14+
#includes:
15+
# - ../../vendor/wyrihaximus/async-test-utilities/rules.neon

src/Runtime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function __construct(private EventLoopBridge $eventLoopBridge, string $au
2626
}
2727

2828
/**
29-
* @param (Closure():T)|(Closure():void) $callable
30-
* @param array<int, mixed> $args
29+
* @param (Closure():T)|(Closure():void) $callable
30+
* @param array<int, mixed> $args
3131
*
3232
* @return ($callable is (Closure():T) ? T : null)
3333
*

stubs/Channel.stub

Lines changed: 0 additions & 82 deletions
This file was deleted.

stubs/Event.stub

Lines changed: 0 additions & 36 deletions
This file was deleted.

stubs/Future.stub

Lines changed: 0 additions & 54 deletions
This file was deleted.

tests/Types.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
declare(strict_types=1);
44

5-
use ReactParallel\Runtime\Runtime;
65
use ReactParallel\EventLoop\EventLoopBridge;
6+
use ReactParallel\Runtime\Runtime;
77

88
use function PHPStan\Testing\assertType;
99

@@ -17,5 +17,5 @@
1717
return time() % 2 !== 0 ? true : time();
1818
}));
1919

20-
assertType('null', $pool->run(static function () {
20+
assertType('null', $pool->run(static function (): void {
2121
}));

0 commit comments

Comments
 (0)