Passed
Push — master ( 82a6d6...1c12ad )
by Alec
03:13
created

BenchmarkRelative::getAverage()   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 float */
10
    private $relative;
11
    /** @var float */
12
    private $average;
13
14
    /**
15
     * BenchmarkRelative constructor.
16
     * @param float $relative
17
     * @param float $average
18
     */
19 2
    public function __construct(float $relative, float $average)
20
    {
21 2
        $this->relative = $relative;
22 2
        $this->average = $average;
23 2
    }
24
25
    /**
26
     * @return float
27
     */
28 2
    public function getRelative(): float
29
    {
30 2
        return $this->relative;
31
    }
32
33
    /**
34
     * @return float
35
     */
36 2
    public function getAverage(): float
37
    {
38 2
        return $this->average;
39
    }
40
}
41