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/prime/index.php (2 issues)

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
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

11
$loop = /** @scrutinizer ignore-deprecated */ Factory::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...
12
13
$prime = isset($argv[1]) ? (int)$argv[1] : \mt_rand(1, 1337);
14
15
echo 'Checking if ', $prime, ' is a prime or not', PHP_EOL;
16
17
MessengerFactory::parentFromClass(ExamplesChildProcess::class, $loop)->then(function (Messenger $messenger) use ($prime) {
18
    return $messenger->rpc(
19
        MessageFactory::rpc('isPrime', ['number' => $prime])
20
    )->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 ignore-call  annotation

20
    )->/** @scrutinizer ignore-call */ always(function () use ($messenger) {
Loading history...
21
        $messenger->softTerminate();
22
    });
23
})->done(function (Payload $result) {
24
    if ($result['isPrime']) {
25
        echo 'Prime', PHP_EOL;
26
27
        return;
28
    }
29
30
    echo 'Not a prime', PHP_EOL;
31
});
32
33
$loop->run();
34