1 | <?php |
||||
2 | |||||
3 | require \dirname(\dirname(__DIR__)) . '/vendor/autoload.php'; |
||||
4 | |||||
5 | use React\EventLoop\Factory; |
||||
6 | use WyriHaximus\React\ChildProcess\Messenger\Factory as MessengerFactory; |
||||
7 | use WyriHaximus\React\ChildProcess\Messenger\Messages\Factory as MessageFactory; |
||||
8 | use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload; |
||||
9 | use WyriHaximus\React\ChildProcess\Messenger\Messenger; |
||||
10 | |||||
11 | $loop = Factory::create(); |
||||
0 ignored issues
–
show
|
|||||
12 | |||||
13 | MessengerFactory::parentFromClass('\ExamplesChildProcess', $loop)->then(function (Messenger $messenger) { |
||||
14 | return $messenger->rpc( |
||||
15 | MessageFactory::rpc('error') |
||||
16 | )->always(function () use ($messenger) { |
||||
0 ignored issues
–
show
The method
always() 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
![]() |
|||||
17 | $messenger->softTerminate(); |
||||
18 | }); |
||||
19 | })->done(function (Payload $result) { |
||||
0 ignored issues
–
show
The parameter
$result 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. ![]() |
|||||
20 | throw new Exception('Should never reach this!'); |
||||
21 | }, function ($et) { |
||||
22 | echo (string)$et; |
||||
23 | }); |
||||
24 | |||||
25 | $loop->run(); |
||||
26 |
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.