Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function Link($action = null) |
||
13 | { |
||
14 | if ($url = array_search(get_called_class(), (array)Config::inst()->get('Director', 'rules'))) { |
||
15 | // Check for slashes and drop them |
||
16 | if ($indexOf = stripos($url, '/')) { |
||
17 | $url = substr($url, 0, $indexOf); |
||
18 | } |
||
19 | return $this->join_links($url, $action); |
||
20 | } |
||
21 | } |
||
22 | |||
42 |
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.