Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
55 | protected function normalize_url() : string |
||
56 | { |
||
57 | $normalized = $this->info->getScheme().'://'.$this->info->getHost(); |
||
58 | |||
59 | if($this->info->hasPath()) { |
||
60 | $normalized .= $this->info->getPath(); |
||
61 | } |
||
62 | |||
63 | $params = $this->info->getParams(); |
||
64 | if(!empty($params)) { |
||
65 | $normalized .= '?'.http_build_query($params); |
||
66 | } |
||
67 | |||
68 | if($this->info->hasFragment()) { |
||
69 | $normalized .= '#'.$this->info->getFragment(); |
||
70 | } |
||
71 | |||
72 | return $normalized; |
||
73 | } |
||
75 |