| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 4 | public function generate(): string |
|
| 26 | { |
||
| 27 | // do ... while |
||
| 28 | 4 | if (self::TYPE_DO_WHILE === $this->type) { |
|
| 29 | return <<<CODE |
||
| 30 | 1 | do { |
|
| 31 | 1 | {$this->generateContent()} |
|
| 32 | 1 | } while ($this->condition) |
|
| 33 | CODE; |
||
| 34 | } |
||
| 35 | |||
| 36 | // Other loop types |
||
| 37 | return <<<CODE |
||
| 38 | 4 | $this->type ($this->condition) { |
|
| 39 | 4 | {$this->generateContent()} |
|
| 40 | } |
||
| 64 |