Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | protected function checkIfDumpWasSuccessFul(Process $process, $outputFile) |
||
36 | { |
||
37 | if (!$process->isSuccessful()) { |
||
38 | throw DumpFailed::processDidNotEndSuccessfully($process); |
||
39 | } |
||
40 | |||
41 | if (!file_exists($outputFile)) { |
||
42 | throw DumpFailed::dumpfileWasNotCreated(); |
||
43 | } |
||
44 | |||
45 | if (filesize($outputFile) === 0) { |
||
46 | throw DumpFailed::dumpfileWasEmpty(); |
||
47 | } |
||
48 | |||
49 | return true; |
||
50 | } |
||
51 | } |
||
52 |