Completed
Push — develop ( fe1195...b733eb )
by Alec
05:48
created

BenchmarkFields::getProfiler()   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
12
trait BenchmarkFields
13
{
14
    /** @var array */
15
    protected $functions = [];
16
    /** @var Profiler */
17
    protected $profiler;
18
    /** @var int */
19
    protected $totalIterations = 0;
20
    /** @var bool */
21
    protected $withResults = false;
22
    /** @var array */
23
    private $exceptionMessages = [];
24
25
    /**
26
     * @return array
27
     */
28 3
    public function getFunctions(): array
29
    {
30 3
        return $this->functions;
31
    }
32
33
    /**
34
     * @return Profiler
35
     */
36 3
    public function getProfiler(): Profiler
37
    {
38 3
        return $this->profiler;
39
    }
40
41
    /**
42
     * @return int
43
     */
44 3
    public function getTotalIterations(): int
45
    {
46 3
        return $this->totalIterations;
47
    }
48
49
    /**
50
     * @return bool
51
     */
52 3
    public function isWithResults(): bool
53
    {
54 3
        return $this->withResults;
55
    }
56
57
    /**
58
     * @return array
59
     */
60 3
    public function getExceptionMessages(): array
61
    {
62 3
        return $this->exceptionMessages;
63
    }
64
}
65