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.
Passed
Push — master ( 5892ba...e25f6a )
by Baptiste
03:37 queued 29s
created

Memory::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Server\Status\Server\Process;
5
6
use Innmind\Server\Status\Exception\OutOfBoundsPercentage;
7
8
final class Memory
9
{
10
    private float $value;
11
12 21
    public function __construct(float $value)
13
    {
14 21
        if ($value < 0 || $value > 100) {
15 6
            throw new OutOfBoundsPercentage((string) $value);
16
        }
17
18 15
        $this->value = $value;
19 15
    }
20
21 3
    public function toFloat(): float
22
    {
23 3
        return $this->value;
24
    }
25
26 3
    public function toString(): string
27
    {
28 3
        return $this->value.'%';
29
    }
30
}
31