| @@ 471-480 (lines=10) @@ | ||
| 468 | * |
|
| 469 | * @return bool |
|
| 470 | */ |
|
| 471 | private function moveToNextLine() |
|
| 472 | { |
|
| 473 | if ($this->currentLineNb >= count($this->lines) - 1) { |
|
| 474 | return false; |
|
| 475 | } |
|
| 476 | ||
| 477 | $this->currentLine = $this->lines[++$this->currentLineNb]; |
|
| 478 | ||
| 479 | return true; |
|
| 480 | } |
|
| 481 | ||
| 482 | /** |
|
| 483 | * Moves the parser to the previous line. |
|
| @@ 487-496 (lines=10) @@ | ||
| 484 | * |
|
| 485 | * @return bool |
|
| 486 | */ |
|
| 487 | private function moveToPreviousLine() |
|
| 488 | { |
|
| 489 | if ($this->currentLineNb < 1) { |
|
| 490 | return false; |
|
| 491 | } |
|
| 492 | ||
| 493 | $this->currentLine = $this->lines[--$this->currentLineNb]; |
|
| 494 | ||
| 495 | return true; |
|
| 496 | } |
|
| 497 | ||
| 498 | /** |
|
| 499 | * Parses a YAML value. |
|