Passed
Push — develop ( d04ffa...d2ca78 )
by Alec
03:35
created

BenchmarkRelative   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 32
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRelative() 0 3 1
A __construct() 0 4 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 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