| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | protected function respond503() |
||
| 36 | { |
||
| 37 | $message = 'Website is down for maintenance'; |
||
| 38 | $content = '<h1>'.$message.'</h1>'; |
||
| 39 | |||
| 40 | header($message, true, 503); |
||
| 41 | |||
| 42 | $errorFile = BASE_PATH.'/assets/error-503.html'; |
||
| 43 | if(is_file($errorFile)) { |
||
| 44 | $content = file_get_contents($errorFile); |
||
| 45 | } |
||
| 46 | |||
| 47 | echo $content; |
||
| 48 | exit(); |
||
| 49 | } |
||
| 50 | |||
| 52 |
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.