| 1 | <?php |
||
| 20 | final class BlockContinue |
||
| 21 | { |
||
| 22 | /** @var CursorState|null */ |
||
| 23 | private $cursorState; |
||
| 24 | |||
| 25 | /** @var bool */ |
||
| 26 | private $finalize; |
||
| 27 | |||
| 28 | 900 | private function __construct(?CursorState $cursorState = null, bool $finalize = false) |
|
| 33 | |||
| 34 | 894 | public function getCursorState(): ?CursorState |
|
| 38 | |||
| 39 | 900 | public function isFinalize(): bool |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Signal that we cannot continue here |
||
| 46 | * |
||
| 47 | * @return null |
||
| 48 | */ |
||
| 49 | 825 | public static function none(): ?self |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Signal that we're continuing at the given position |
||
| 56 | * |
||
| 57 | * @param Cursor $cursor |
||
| 58 | * |
||
| 59 | * @return self |
||
| 60 | */ |
||
| 61 | 894 | public static function at(Cursor $cursor): self |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Signal that we want to finalize and close the block |
||
| 68 | * |
||
| 69 | * @return self |
||
| 70 | */ |
||
| 71 | 87 | public static function finished(): self |
|
| 75 | } |
||
| 76 |