Completed
Push — master ( 6a7da5...1827cf )
by Alec
08:13 queued 02:32
created

BenchmarkFields::isWithResults()   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 Timer */
25
    private $timer;
26
27
28
    /**
29
     * @return array
30
     */
31 3
    public function getFunctions(): array
32
    {
33 3
        return $this->functions;
34
    }
35
36
    /**
37
     * @return Profiler
38
     */
39 3
    public function getProfiler(): Profiler
40
    {
41 3
        return $this->profiler;
42
    }
43
44
    /**
45
     * @return int
46
     */
47 3
    public function getDoneIterations(): int
48
    {
49 3
        return $this->doneIterations;
50
    }
51
52
    /**
53
     * @return Timer
54
     */
55 3
    public function getTimer(): Timer
56
    {
57 3
        return $this->timer;
58
    }
59
}
60