Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 8 | protected function prepareDumpCommand(string $destinationPath): string |
|
26 | { |
||
27 | 8 | $dumpCommand = sprintf( |
|
28 | 8 | "%s %s .dump", |
|
29 | 8 | $this->quoteCommand($this->commandBinaryPath . 'sqlite3'), |
|
30 | 8 | $this->dbName |
|
31 | ); |
||
32 | |||
33 | 8 | if ($this->isCompress) { |
|
34 | 2 | $compressCommand = $this->quoteCommand("{$this->compressBinaryPath}{$this->compressCommand}"); |
|
35 | 2 | return "{$dumpCommand} | $compressCommand > \"{$destinationPath}{$this->compressExtension}\""; |
|
36 | } |
||
37 | |||
38 | 6 | return "{$dumpCommand} > \"{$destinationPath}\""; |
|
39 | } |
||
56 |