Completed
Push — develop ( d2e190...d276d7 )
by Alec
10:43 queued 07:55
created

BenchmarkRelative   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

4 Methods

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