1 | <?php |
||||||
2 | |||||||
3 | use React\EventLoop\Factory as LoopFactory; |
||||||
4 | use WyriHaximus\React\ChildProcess\Messenger\ChildProcess\ArgvEncoder; |
||||||
5 | use WyriHaximus\React\ChildProcess\Messenger\Factory as MessengerFactory; |
||||||
6 | use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload; |
||||||
7 | use WyriHaximus\React\ChildProcess\Messenger\Messenger; |
||||||
8 | |||||||
9 | foreach ([ |
||||||
10 | __DIR__ . '/../../vendor/autoload.php', |
||||||
11 | __DIR__ . '/../../../../autoload.php', |
||||||
12 | ] as $file) { |
||||||
13 | if (\file_exists($file)) { |
||||||
14 | require $file; |
||||||
15 | break; |
||||||
16 | } |
||||||
17 | } |
||||||
18 | |||||||
19 | $arguments = \array_pop($argv); |
||||||
20 | $loop = LoopFactory::create(); |
||||||
0 ignored issues
–
show
|
|||||||
21 | MessengerFactory::child($loop, ArgvEncoder::decode($arguments))->done(function (Messenger $messenger) use ($loop) { |
||||||
0 ignored issues
–
show
The method
done() does not exist on React\Promise\PromiseInterface . It seems like you code against a sub-type of said class. However, the method does not exist in React\Promise\CancellablePromiseInterface . Are you sure you never get one of those?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
22 | $messenger->registerRpc('hello', function (Payload $payload, Messenger $messenger) { |
||||||
0 ignored issues
–
show
The parameter
$messenger is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$payload is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
23 | \sleep(1); |
||||||
24 | |||||||
25 | return \React\Promise\resolve([ |
||||||
26 | 'world' => 'hello world', |
||||||
27 | ]); |
||||||
28 | }); |
||||||
29 | }); |
||||||
30 | $loop->run(); |
||||||
31 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.