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 ( 2352be...4fa160 )
by Baptiste
03:32 queued 59s
created

Cpu::cores()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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