| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Rename extends AQuery |
||
| 15 | { |
||
| 16 | protected string $filePath = ''; |
||
| 17 | protected string $newPath = ''; |
||
| 18 | |||
| 19 | 1 | protected function getCommand(): int |
|
| 20 | { |
||
| 21 | 1 | return Fsp::CC_RENAME; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function setFilePath(string $filePath): self |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | public function setNewPath(string $newPath): self |
|
| 31 | { |
||
| 32 | 1 | $this->newPath = $newPath; |
|
| 33 | 1 | return $this; |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | protected function getFilePosition(): int |
|
| 37 | { |
||
| 38 | 1 | return strlen($this->getExtraData()); |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | protected function getData(): string |
|
| 42 | { |
||
| 43 | 1 | return $this->filePath . chr(0); |
|
| 44 | } |
||
| 45 | |||
| 46 | 1 | protected function getExtraData(): string |
|
| 49 | } |
||
| 50 | } |
||
| 51 |