Passed
Push — master ( a8143e...3e58a4 )
by Alec
02:47
created

BenchmarkFields::getDoneIterationsCombined()   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
 * User: alec
4
 * Date: 01.12.18
5
 * Time: 20:33
6
 */
7
8
namespace AlecRabbit\Tools\Traits;
9
10
use AlecRabbit\Tools\Profiler;
11
use AlecRabbit\Tools\Timer;
12
13
trait BenchmarkFields
14
{
15
    /** @var array */
16
    protected $functions = [];
17
18
    /** @var Profiler */
19
    protected $profiler;
20
21
    /** @var int */
22
    protected $doneIterations = 0;
23
24
    /** @var int */
25
    protected $doneIterationsCombined = 0;
26
27
    /** @var Timer */
28
    private $timer;
29
30
31
    /**
32
     * @return array
33
     */
34 5
    public function getFunctions(): array
35
    {
36 5
        return $this->functions;
37
    }
38
39
    /**
40
     * @return Profiler
41
     */
42 5
    public function getProfiler(): Profiler
43
    {
44 5
        return $this->profiler;
45
    }
46
47
    /**
48
     * @return int
49
     */
50 5
    public function getDoneIterations(): int
51
    {
52 5
        return $this->doneIterations;
53
    }
54
55
    /**
56
     * @return Timer
57
     */
58 5
    public function getTimer(): Timer
59
    {
60 5
        return $this->timer;
61
    }
62
63
    /**
64
     * @return int
65
     */
66 5
    public function getDoneIterationsCombined(): int
67
    {
68 5
        return $this->doneIterationsCombined;
69
    }
70
}
71