GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (47)

examples/advanced-own-child-process/child.php (5 issues)

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
Deprecated Code introduced by
The function React\EventLoop\Factory::create() has been deprecated: 1.2.0 See Loop::get() instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

20
$loop = /** @scrutinizer ignore-deprecated */ LoopFactory::create();

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.

Loading history...
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 ignore-call  annotation

21
MessengerFactory::child($loop, ArgvEncoder::decode($arguments))->/** @scrutinizer ignore-call */ done(function (Messenger $messenger) use ($loop) {
Loading history...
The import $loop is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
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 ignore-unused  annotation

22
    $messenger->registerRpc('hello', function (Payload $payload, /** @scrutinizer ignore-unused */ Messenger $messenger) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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 ignore-unused  annotation

22
    $messenger->registerRpc('hello', function (/** @scrutinizer ignore-unused */ Payload $payload, Messenger $messenger) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
        \sleep(1);
24
25
        return \React\Promise\resolve([
26
            'world' => 'hello world',
27
        ]);
28
    });
29
});
30
$loop->run();
31