Conditions | 4 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
30 | 10 | public function buildOn(ReportableInterface $profiler): ReportInterface |
|
31 | { |
||
32 | 10 | if ($profiler instanceof Profiler) { |
|
33 | 9 | foreach ($profiler->getCounters() as $counter) { |
|
34 | 9 | $this->reports[self::COUNTERS][$counter->getName()] = $counter->report(); |
|
35 | } |
||
36 | 9 | foreach ($profiler->getTimers() as $timer) { |
|
37 | 9 | $this->reports[self::TIMERS][$timer->getName()] = $timer->report(); |
|
38 | } |
||
39 | } else { |
||
40 | 1 | $this->wrongReportable(Profiler::class, $profiler); |
|
41 | } |
||
42 | 9 | return $this; |
|
43 | } |
||
61 |