Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
27 | 43 | public function buildOn(ReportableInterface $counter): ReportInterface |
|
28 | { |
||
29 | 43 | if ($counter instanceof SimpleCounter) { |
|
30 | 43 | $this->name = $counter->getName(); |
|
31 | 43 | $this->value = $counter->getValue(); |
|
32 | 43 | $this->step = $counter->getStep(); |
|
33 | 43 | $this->started = $counter->isStarted(); |
|
34 | 43 | $this->initialValue = $counter->getInitialValue(); |
|
35 | 43 | $this->bumped = $counter->getBumped(); |
|
36 | } else { |
||
37 | 1 | $this->wrongReportable(SimpleCounter::class, $counter); |
|
38 | } |
||
39 | 43 | return $this; |
|
40 | } |
||
42 |