Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
15 | protected function checkIfDumpWasSuccessFull(Process $process, string $outputFile) : bool |
||
16 | { |
||
17 | if (!$process->isSuccessful()) { |
||
18 | throw DumpFailed::processDidNotEndSuccessfully($this->process); |
||
|
|||
19 | } |
||
20 | |||
21 | if (!file_exists($outputFile)) { |
||
22 | throw DumpFailed::dumpfileWasNotCreated(); |
||
23 | } |
||
24 | |||
25 | if (filesize($outputFile) === 0) { |
||
26 | throw DumpFailed::dumpfileWasEmpty(); |
||
27 | } |
||
28 | |||
29 | return true; |
||
30 | } |
||
31 | } |
||
32 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: