| @@ 485-494 (lines=10) @@ | ||
| 482 | * |
|
| 483 | * @return bool |
|
| 484 | */ |
|
| 485 | private function moveToNextLine() |
|
| 486 | { |
|
| 487 | if ($this->currentLineNb >= count($this->lines) - 1) { |
|
| 488 | return false; |
|
| 489 | } |
|
| 490 | ||
| 491 | $this->currentLine = $this->lines[++$this->currentLineNb]; |
|
| 492 | ||
| 493 | return true; |
|
| 494 | } |
|
| 495 | ||
| 496 | /** |
|
| 497 | * Moves the parser to the previous line. |
|
| @@ 501-510 (lines=10) @@ | ||
| 498 | * |
|
| 499 | * @return bool |
|
| 500 | */ |
|
| 501 | private function moveToPreviousLine() |
|
| 502 | { |
|
| 503 | if ($this->currentLineNb < 1) { |
|
| 504 | return false; |
|
| 505 | } |
|
| 506 | ||
| 507 | $this->currentLine = $this->lines[--$this->currentLineNb]; |
|
| 508 | ||
| 509 | return true; |
|
| 510 | } |
|
| 511 | ||
| 512 | /** |
|
| 513 | * Parses a YAML value. |
|