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.

Factory::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 15
rs 9.9666
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WyriHaximus\React\ChildProcess\Messenger\ChildProcess;
6
7
use React\EventLoop\Loop;
8
use WyriHaximus\React\ChildProcess\Messenger\Factory as MessengerFactory;
9
use WyriHaximus\React\ChildProcess\Messenger\Messenger;
10
11
final class Factory
12
{
13
    public static function boot(string $arguments): int
14
    {
15
        $exitCode = 0;
16
17
        $loop = Loop::get();
18
        MessengerFactory::child($loop, ArgvEncoder::decode($arguments))->then(static function (Messenger $messenger) use ($loop): void {
19
            Process::create($loop, $messenger);
20
        })->then(null, static function () use ($loop, &$exitCode): void {
21
            $loop->stop();
22
            $exitCode = 1;
23
        });
24
25
        $loop->run();
26
27
        return $exitCode;
28
    }
29
}
30