| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function run($request) |
||
| 16 | { |
||
| 17 | $path = $this->getHtAccessPath(); |
||
| 18 | $currentContent = file_get_contents($path); |
||
| 19 | $contentToRemove = $this->getHtAccessContent(); |
||
| 20 | if (strpos($currentContent, $contentToRemove) !== false) { |
||
| 21 | $currentContent = str_replace($contentToRemove, '', $currentContent); |
||
| 22 | $currentContent = str_replace($contentToRemove, '', $currentContent); |
||
| 23 | $currentContent = str_replace($contentToRemove, '', $currentContent); |
||
| 24 | } |
||
| 25 | file_put_contents($path, $currentContent); |
||
| 26 | |||
| 27 | return 'Your site is now offline.'; |
||
| 28 | } |
||
| 30 |