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   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 41
c 0
b 0
f 0
ccs 17
cts 17
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A user() 0 4 1
A system() 0 4 1
A idle() 0 4 1
A __toString() 0 9 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