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.
Completed
Push — master ( 93608b...d96f4b )
by Cees-Jan
03:32
created

ReturnChild::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1.008

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 4
cts 5
cp 0.8
rs 9.4286
cc 1
eloc 4
nc 1
nop 2
crap 1.008
1
<?php
2
3
namespace WyriHaximus\React\ChildProcess\Messenger;
4
5
use React\EventLoop\LoopInterface;
6
use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload;
7
8
class ReturnChild implements ChildInterface
9
{
10
    /**
11
     * @var bool
12
     */
13
    protected $ran = false;
14
15 1
    public static function create(Messenger $messenger, LoopInterface $loop)
16
    {
17 1
        new static($messenger, $loop);
18 1
    }
19
20
    protected function __construct(Messenger $messenger, LoopInterface $loop)
0 ignored issues
show
Unused Code introduced by
The parameter $loop is not used and could be removed.

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

Loading history...
21
    {
22 1
        $messenger->registerRpc('return', function (Payload $payload) {
23
            return \React\Promise\resolve($payload->getPayload());
24 1
        });
25 1
        $this->ran = true;
26 1
    }
27
28
    public function getRan()
29
    {
30
        return $this->ran;
31
    }
32
}
33