Passed
Push — develop ( 84aa32...d180ee )
by Alec
02:42
created

BenchmarkFields::getDoneIterations()   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\Accessories\MemoryUsageReport;
11
use AlecRabbit\Tools\Profiler;
12
use AlecRabbit\Tools\Timer;
13
14
trait BenchmarkFields
15
{
16
    /** @var array */
17
    protected $functions = [];
18
19
    /** @var Profiler */
20
    protected $profiler;
21
22
    /** @var MemoryUsageReport */
23
    protected $memoryUsageReport;
24
25
    /** @var int */
26
    protected $doneIterations = 0;
27
28
    /** @var int */
29
    protected $doneIterationsCombined = 0;
30
31
    /** @var Timer */
32
    private $timer;
33
34
35
    /**
36
     * @return array
37
     */
38 5
    public function getFunctions(): array
39
    {
40 5
        return $this->functions;
41
    }
42
43
    /**
44
     * @return Profiler
45
     */
46 5
    public function getProfiler(): Profiler
47
    {
48 5
        return $this->profiler;
49
    }
50
51
    /**
52
     * @return int
53
     */
54 5
    public function getDoneIterations(): int
55
    {
56 5
        return $this->doneIterations;
57
    }
58
59
    /**
60
     * @return Timer
61
     */
62 5
    public function getTimer(): Timer
63
    {
64 5
        return $this->timer;
65
    }
66
67
    /**
68
     * @return int
69
     */
70 5
    public function getDoneIterationsCombined(): int
71
    {
72 5
        return $this->doneIterationsCombined;
73
    }
74
75
    /**
76
     * @return MemoryUsageReport
77
     */
78 5
    public function getMemoryUsageReport(): MemoryUsageReport
79
    {
80 5
        return $this->memoryUsageReport;
81
    }
82
}
83