Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | 8 | protected function prepareRestoreCommand(string $filePath): string |
|
42 | { |
||
43 | 8 | $restoreCommand = sprintf("%s %s", |
|
44 | 8 | $this->quoteCommand($this->commandBinaryPath . 'sqlite3'), |
|
45 | 8 | $this->dbName |
|
46 | ); |
||
47 | |||
48 | 8 | if ($this->isCompress) { |
|
49 | 2 | $compressCommand = $this->quoteCommand("{$this->compressBinaryPath}{$this->compressCommand}"); |
|
50 | 2 | return "$compressCommand < \"{$filePath}\" | {$restoreCommand}"; |
|
51 | } |
||
52 | |||
53 | 6 | return "{$restoreCommand} < \"{$filePath}\""; |
|
54 | } |
||
56 |