| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function write(ISpinnerState $spinnerState): void |
||
| 32 | { |
||
| 33 | if ($this->initialized) { |
||
| 34 | $this->output->bufferedWrite($spinnerState->getSequence()); |
||
| 35 | |||
| 36 | $width = $spinnerState->getWidth(); |
||
| 37 | $eraseWidth = max($spinnerState->getPreviousWidth() - $width, 0); |
||
| 38 | |||
| 39 | $this->cursor->erase($eraseWidth)->moveLeft($width); |
||
| 40 | |||
| 41 | $this->output->flush(); |
||
| 42 | } |
||
| 58 |