| Conditions | 5 | 
| Paths | 8 | 
| Total Lines | 10 | 
| Code Lines | 8 | 
| Lines | 1 | 
| Ratio | 10 % | 
| Tests | 7 | 
| CRAP Score | 5.2742 | 
| Changes | 5 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 11 | 116 |     public function __construct($phref, $prel = NULL, $ptitle = NULL) { | 
            |
| 12 | 116 | parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle);  | 
            |
| 13 | 116 | View Code Duplication | if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB));  | 
            
| 14 | 116 |         if (!preg_match ("#^\?(.*)#", $this->href) && !empty ($this->href)) $this->href = "?" . $this->href; | 
            |
| 15 | 116 |         if (preg_match ("/(bookdetail|getJSON).php/", parent::getScriptName())) { | 
            |
| 16 | $this->href = "index.php" . $this->href;  | 
            ||
| 17 |         } else { | 
            ||
| 18 | 116 | $this->href = parent::getScriptName() . $this->href;  | 
            |
| 19 | }  | 
            ||
| 20 | 116 | }  | 
            |
| 21 | }  | 
            ||
| 22 | 
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.