| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function dequeue() |
||
| 27 | { |
||
| 28 | $this->dequeuedCount++; |
||
| 29 | $msgtype = $message = null; |
||
| 30 | $success = msg_receive($this->id, 1, $msgtype, self::RESULT_MAX_SIZE, $message); |
||
| 31 | |||
| 32 | if (!$success) { |
||
| 33 | throw new \RuntimeException('failed to dequeue result'); |
||
| 34 | } |
||
| 35 | |||
| 36 | return unserialize($message); |
||
| 37 | } |
||
| 38 | |||
| 55 |
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: