| Conditions | 3 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | public function requireServerId($allowedIds) |
||
| 53 | { |
||
| 54 | if (!$this->isServerIdAllowed($allowedIds)) { |
||
| 55 | $message = 'This program can only run on ' . |
||
| 56 | (is_array($allowedIds) |
||
| 57 | ? 'servers: ' . implode(', ', $allowedIds) |
||
| 58 | : 'server ' . $allowedIds); |
||
| 59 | |||
| 60 | throw new ServerIdProhibited($message); |
||
| 61 | } |
||
| 62 | |||
| 63 | return $this; |
||
| 64 | } |
||
| 66 |