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

BenchmarkRelative::getRank()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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