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.

Line   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 2
b 0
f 0
dl 0
loc 22
rs 10
ccs 6
cts 6
cp 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getPayload() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WyriHaximus\React\ChildProcess\Messenger\Messages;
6
7
use JsonSerializable;
8
9
use function Safe\json_encode;
10
11
final class Line implements LineInterface
12
{
13
    protected JsonSerializable $payload;
14
15 6
    /**
16
     * @param array<mixed> $options
17 6
     *
18 6
     * @phpstan-ignore-next-line
19
     */
20
    public function __construct(ActionableMessageInterface $payload, array $options)
21
    {
22
        $this->payload = $payload;
23 6
    }
24
25 6
    public function __toString(): string
26
    {
27
        return json_encode($this->payload) . LineInterface::EOL;
28
    }
29
30
    public function getPayload(): JsonSerializable
31 2
    {
32
        return $this->payload;
33 2
    }
34
}
35