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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 70%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 25
ccs 7
cts 10
cp 0.7
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 7 1
A getRan() 0 4 1
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