| 1 | <?php |
||
| 4 | class SuperSakeChecker |
||
|
|
|||
| 5 | { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Checks if the supersake file in webroot is protected with htaccess or web.config |
||
| 9 | * |
||
| 10 | * From the command line we don't know on what server software we are running, |
||
| 11 | * so we just checking if a .htaccess or web.config exists and has the protection lines in it. |
||
| 12 | * |
||
| 13 | * If one of the files has access to the file denied, we consider this protected |
||
| 14 | * |
||
| 15 | * @return bool|string |
||
| 16 | */ |
||
| 17 | public function superSakeIsNotProtected() |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $file |
||
| 28 | * @return bool|string |
||
| 29 | */ |
||
| 30 | protected function hasHtAccessProtection($file) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $file |
||
| 38 | * @return bool|string |
||
| 39 | */ |
||
| 40 | protected function hasWebConfigProtection($file) |
||
| 45 | |||
| 46 | public function htaccessContent() |
||
| 60 | |||
| 61 | public function webconfigContent() |
||
| 69 | |||
| 70 | |||
| 71 | } |
||
| 72 |
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.