| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function restore() |
||
| 23 | { |
||
| 24 | $binaryPath = $this->module->binaries['pg_restore']; |
||
| 25 | $command = "PGPASSWORD='{$this->password}' {$binaryPath} -c -Fc -j 4 -h {$this->host} -p {$this->port} -U {$this->username} -d {$this->database} {$this->backupFilePath}"; |
||
| 26 | exec($command, $return); |
||
| 27 | if (!empty($return)) |
||
| 28 | throw new PostgresDumpException(); |
||
| 29 | } |
||
| 36 |