Passed
Push — develop ( 7e6335...d04ffa )
by Alec
03:48
created

BenchmarkFields   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 60
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getExceptions() 0 3 1
A getTotalIterations() 0 3 1
A getProfiler() 0 3 1
A isWithResults() 0 3 1
A getExceptionMessages() 0 3 1
A getFunctions() 0 3 1
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
    /** @var array */
25
    private $exceptions = [];
26
27
    /**
28
     * @return array
29
     */
30 4
    public function getFunctions(): array
31
    {
32 4
        return $this->functions;
33
    }
34
35
    /**
36
     * @return Profiler
37
     */
38 4
    public function getProfiler(): Profiler
39
    {
40 4
        return $this->profiler;
41
    }
42
43
    /**
44
     * @return int
45
     */
46 4
    public function getTotalIterations(): int
47
    {
48 4
        return $this->totalIterations;
49
    }
50
51
    /**
52
     * @return bool
53
     */
54 4
    public function isWithResults(): bool
55
    {
56 4
        return $this->withResults;
57
    }
58
59
    /**
60
     * @return array
61
     */
62 4
    public function getExceptionMessages(): array
63
    {
64 4
        return $this->exceptionMessages;
65
    }
66
    /**
67
     * @return array
68
     */
69 4
    public function getExceptions(): array
70
    {
71 4
        return $this->exceptions;
72
    }
73
}
74