| Total Complexity | 7 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 4 | class DiffFileState |
||
| 5 | { |
||
| 6 | private $currentPosition = 0; |
||
| 7 | private $currentFile; |
||
| 8 | private $changeLines = []; |
||
| 9 | |||
| 10 | public function setCurrentPosition(int $position) |
||
| 11 | { |
||
| 12 | $this->currentPosition = $position; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function setCurrentFile(string $currentFile) |
||
| 16 | { |
||
| 17 | $this->currentFile = $currentFile; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function addChangeLine() |
||
| 21 | { |
||
| 22 | if (!isset($this->changeLines[$this->currentFile])) { |
||
| 23 | $this->changeLines[$this->currentFile] = []; |
||
| 24 | } |
||
| 25 | $this->changeLines[$this->currentFile][] = $this->currentPosition; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function incrementCurrentPosition() |
||
| 29 | { |
||
| 30 | $this->currentPosition++; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function decrementCurrentPosition() |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getChangedLines(): array |
||
| 39 | { |
||
| 41 | } |
||
| 42 | } |
||
| 43 |