Passed
Push — develop ( c21a1a...566459 )
by Alec
02:51 queued 10s
created

BenchmarkFields   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 45
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTimer() 0 3 1
A getDoneIterations() 0 3 1
A getProfiler() 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
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