| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 23 | 10 | protected function extractDataFrom(AbstractReportable $reportable = null): void |
|
| 24 | { |
||
| 25 | 10 | if ($reportable instanceof AbstractTimer) { |
|
| 26 | 10 | $this->name = $reportable->getName(); |
|
| 27 | 10 | $this->creationTime = $reportable->getCreation(); |
|
| 28 | 10 | $this->count = $count = $reportable->getCount(); |
|
| 29 | 10 | $this->minValue = ($count === 1) ? $reportable->getLastValue() : $reportable->getMinValue(); |
|
| 30 | 10 | $this->maxValue = $reportable->getMaxValue(); |
|
| 31 | 10 | $this->maxValueIteration = $reportable->getMaxValueIteration(); |
|
| 32 | 10 | $this->minValueIteration = $reportable->getMinValueIteration(); |
|
| 33 | 10 | $this->started = $reportable->isStarted(); |
|
| 34 | 10 | $this->stopped = $reportable->isStopped(); |
|
| 35 | 10 | $this->avgValue = $reportable->getAverageValue(); |
|
| 36 | 10 | $this->currentValue = $reportable->getLastValue(); |
|
| 37 | 10 | $this->elapsed = $reportable->getElapsed(); |
|
| 38 | } |
||
| 41 |