| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | private function getProtocolAgnosticHostname() |
||
| 30 | { |
||
| 31 | $hostname = rtrim($this->owner->MatomoTrackingURL); |
||
| 32 | $hostname = rtrim($hostname, '/'); |
||
| 33 | $hostname .= '/'; |
||
| 34 | |||
| 35 | $hostname = ltrim($hostname); |
||
| 36 | $hostname = str_replace(['http://', 'https://', '//'], '', $hostname); |
||
| 37 | |||
| 38 | $hostname = '//' . $hostname; |
||
| 39 | |||
| 40 | return $hostname; |
||
| 41 | |||
| 49 |