| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 51 | 1 | public function collect(): iterable |
|
| 52 | { |
||
| 53 | 1 | yield 'current' => $this->current; |
|
| 54 | 1 | yield 'total' => $this->total; |
|
| 55 | 1 | yield 'took.min' => $this->tookMin === null ? 0.0 : $this->tookMin; |
|
| 56 | 1 | yield 'took.max' => $this->tookMax; |
|
| 57 | 1 | yield 'took.average' => $this->tookAvg; |
|
| 58 | 1 | yield 'took.total' => $this->tookTotal; |
|
| 59 | |||
| 60 | 1 | $this->total = 0; |
|
| 61 | 1 | $this->tookMin = null; |
|
| 62 | 1 | $this->tookMax = 0.0; |
|
| 63 | 1 | $this->tookAvg = 0.0; |
|
| 64 | 1 | $this->tookTotal = 0; |
|
|
|
|||
| 65 | 1 | } |
|
| 66 | |||
| 72 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.