| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 5 | public function getIndex($version, $id = 'installation') |
||
| 6 | { |
||
| 7 | $supportedVersions = $this->getSupportedVersions(); |
||
| 8 | |||
| 9 | if(File::exists(base_path()."/docs/$version/$id.md")) { |
||
| 10 | $page_source = File::get(base_path()."/docs/$version/$id.md"); |
||
| 11 | $pd = new ParsedownExtra(); |
||
| 12 | $page = $this->replaceVersionPlaceholder($version, $pd->text($page_source)); |
||
| 13 | $index = $this->replaceVersionPlaceholder($version, $pd->text(File::get(base_path()."/docs/$version/documentation.md"))); |
||
| 14 | } else { |
||
| 15 | return Redirect::secure('/'); |
||
| 16 | } |
||
| 17 | |||
| 18 | return View::make('index', compact('index', 'page', 'version', 'supportedVersions')); |
||
| 19 | } |
||
| 20 | |||
| 34 | } |
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.