| 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 | 9 | public function buildOn(ReportableInterface $profiler): ReportInterface |
|
| 31 | { |
||
| 32 | 9 | if ($profiler instanceof Profiler) { |
|
| 33 | 8 | foreach ($profiler->getCounters() as $counter) { |
|
| 34 | 8 | $this->reports[self::COUNTERS][$counter->getName()] = $counter->report(); |
|
| 35 | } |
||
| 36 | 8 | foreach ($profiler->getTimers() as $timer) { |
|
| 37 | 8 | $this->reports[self::TIMERS][$timer->getName()] = $timer->report(); |
|
| 38 | } |
||
| 39 | } else { |
||
| 40 | 1 | $this->wrongReportable(Profiler::class, $profiler); |
|
| 41 | } |
||
| 42 | 8 | return $this; |
|
| 43 | } |
||
| 61 |