Completed
Push — master ( 6a7da5...1827cf )
by Alec
08:13 queued 02:32
created

BenchmarkRelative   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 46
ccs 11
cts 11
cp 1
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 2
    public function __construct(int $rank, float $relative, float $average)
25
    {
26 2
        $this->rank = $rank;
27 2
        $this->relative = $relative;
28 2
        $this->average = $average;
29 2
    }
30
31
    /**
32
     * @return int
33
     */
34 2
    public function getRank(): int
35
    {
36 2
        return $this->rank;
37
    }
38
39
    /**
40
     * @return float
41
     */
42 2
    public function getRelative(): float
43
    {
44 2
        return $this->relative;
45
    }
46
47
    /**
48
     * @return float
49
     */
50 2
    public function getAverage(): float
51
    {
52 2
        return $this->average;
53
    }
54
}
55