Completed
Push — master ( ba86a8...110e22 )
by Alec
04:16 queued 41s
created

Timer::elapsed()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 4
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Tools;
4
5
class Timer extends AbstractTimer
6
{
7
    /**
8
     * @return float
9
     */
10 39
    public function current(): float
11
    {
12
        return
13 39
            microtime(true);
14
    }
15
16
    /**
17
     * @param float $start
18
     * @param float $stop
19
     */
20 17
    protected function assertStartAndStop($start, $stop): void
21
    {
22 17
        $this->assertStart($start);
23 16
        $this->assertStop($stop);
24 15
    }
25
26
    /**
27
     * @param float $start
28
     */
29 16
    protected function assertStart(/** @scrutinizer ignore-unused */ float $start): void
30
    {
31
        // Intentionally left blank
32 16
    }
33
34
    /**
35
     * @param float $stop
36
     */
37 15
    protected function assertStop(/** @scrutinizer ignore-unused */ float $stop): void
38
    {
39
        // Intentionally left blank
40 15
    }
41
}
42