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 — develop ( b5a3b5...401cd0 )
by Baptiste
03:10
created

Cores   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A toInt() 0 3 1
A __construct() 0 7 2
A __toString() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Server\Status\Server\Cpu;
5
6
use Innmind\Server\Status\Exception\DomainException;
7
8
final class Cores
9
{
10
    private $value;
11
12
    public function __construct(int $value)
13
    {
14
        if ($value < 1) {
15
            throw new DomainException((string) $value);
16
        }
17
18
        $this->value = $value;
19
    }
20
21
    public function toInt(): int
22
    {
23
        return $this->value;
24
    }
25
26
    public function __toString(): string
27
    {
28
        return (string) $this->value;
29
    }
30
}
31