| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 36 | public function generate(int $nbLabels): \Iterator |
|
| 39 | { |
||
| 40 | 36 | if (0 >= $nbLabels) { |
|
| 41 | 9 | return; |
|
| 42 | } |
||
| 43 | |||
| 44 | 27 | $count = 0; |
|
| 45 | 27 | $end = $this->int + $nbLabels; |
|
| 46 | 27 | $value = $this->int; |
|
| 47 | 27 | while ($value < $end) { |
|
| 48 | 27 | yield $count => $this->format((string) $value); |
|
| 49 | |||
| 50 | 27 | ++$count; |
|
| 51 | 27 | ++$value; |
|
| 52 | } |
||
| 93 |