| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | protected function throw503() |
||
| 40 | { |
||
| 41 | $message = 'Website is down for maintenance'; |
||
| 42 | $errorFile = $this->get503File(); |
||
| 43 | $content = is_file($errorFile) ? file_get_contents($errorFile) : '<h1>'.$message.'</h1>'; |
||
| 44 | |||
| 45 | throw new SS_HTTPResponse_Exception(new SS_HTTPResponse($content, 503, $message)); |
||
| 46 | } |
||
| 47 | |||
| 58 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.