| @@ 123-134 (lines=12) @@ | ||
| 120 | /** |
|
| 121 | * {@inheritdoc} |
|
| 122 | */ |
|
| 123 | public function getPreviousCharacterContent(\SplFileObject $file) |
|
| 124 | { |
|
| 125 | $originalPosition = $file->ftell(); |
|
| 126 | ||
| 127 | $this->walker->goBeforeCharacter($file, $originalPosition - 1); |
|
| 128 | ||
| 129 | $character = $file->fgetc(); |
|
| 130 | ||
| 131 | $this->walker->goBeforeCharacter($file, $originalPosition); |
|
| 132 | ||
| 133 | return $character; |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * {@inheritdoc} |
|
| @@ 139-150 (lines=12) @@ | ||
| 136 | /** |
|
| 137 | * {@inheritdoc} |
|
| 138 | */ |
|
| 139 | public function getCharacterContent(\SplFileObject $file, $characterNumber) |
|
| 140 | { |
|
| 141 | $originalPosition = $file->ftell(); |
|
| 142 | ||
| 143 | $this->walker->goBeforeCharacter($file, $characterNumber); |
|
| 144 | ||
| 145 | $character = $this->getNextCharacterContent($file); |
|
| 146 | ||
| 147 | $this->walker->goBeforeCharacter($file, $originalPosition); |
|
| 148 | ||
| 149 | return $character; |
|
| 150 | } |
|
| 151 | ||
| 152 | /** |
|
| 153 | * {@inheritdoc} |
|