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
Branch develop (9ca8cc)
by Baptiste
03:18
created

Cpu::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Server\Status\Server;
5
6
use Innmind\Server\Status\Server\Cpu\Percentage;
7
8
final class Cpu
9
{
10
    private $user;
11
    private $system;
12
    private $idle;
13
14 1
    public function __construct(
15
        Percentage $user,
16
        Percentage $system,
17
        Percentage $idle
18
    ) {
19 1
        $this->user = $user;
20 1
        $this->system = $system;
21 1
        $this->idle = $idle;
22 1
    }
23
24 1
    public function user(): Percentage
25
    {
26 1
        return $this->user;
27
    }
28
29 1
    public function system(): Percentage
30
    {
31 1
        return $this->system;
32
    }
33
34 1
    public function idle(): Percentage
35
    {
36 1
        return $this->idle;
37
    }
38
39 1
    public function __toString(): string
40
    {
41 1
        return sprintf(
42 1
            'CPU usage: %s user, %s sys, %s idle',
43 1
            $this->user,
44 1
            $this->system,
45 1
            $this->idle
46
        );
47
    }
48
}
49