Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
46 | 3 | private function benchmark($record, string $context = '') |
|
|
|||
47 | { |
||
48 | 3 | if (empty($this->benchmarker)) { |
|
49 | 2 | $container = $this->iocContainer(); |
|
50 | |||
51 | 2 | if (empty($container) || !$container->has(BenchmarkerInterface::class)) { |
|
52 | //Nothing to do |
||
53 | 1 | return false; |
|
54 | } |
||
55 | |||
56 | 1 | $this->benchmarker = $container->get(BenchmarkerInterface::class); |
|
57 | } |
||
58 | |||
59 | 2 | return $this->benchmarker->benchmark($this, $record, $context); |
|
60 | } |
||
61 | |||
67 |