BenchmarkRelative   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 46
ccs 0
cts 11
cp 0
rs 10
c 2
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getRank() 0 3 1
A getRelative() 0 3 1
A getBenchmarkResult() 0 3 1
A __construct() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Tools\Internal;
4
5
class BenchmarkRelative
6
{
7
    /** @var int */
8
    private $rank;
9
10
    /** @var float */
11
    private $relative;
12
13
    /** @var null|BenchmarkResult */
14
    private $benchmarkResult;
15
16
    /**
17
     * BenchmarkRelative constructor.
18
     * @param int $rank
19
     * @param float $relative
20
     * @param null|BenchmarkResult $result
21
     */
22
    public function __construct(int $rank, float $relative, ?BenchmarkResult $result)
23
    {
24
        $this->rank = $rank;
25
        $this->relative = $relative;
26
        $this->benchmarkResult = $result;
27
    }
28
29
    /**
30
     * @return int
31
     */
32
    public function getRank(): int
33
    {
34
        return $this->rank;
35
    }
36
37
    /**
38
     * @return float
39
     */
40
    public function getRelative(): float
41
    {
42
        return $this->relative;
43
    }
44
45
    /**
46
     * @return null|BenchmarkResult
47
     */
48
    public function getBenchmarkResult(): ?BenchmarkResult
49
    {
50
        return $this->benchmarkResult;
51
    }
52
}
53