| 1 | <?php |
||
| 5 | class Url |
||
| 6 | { |
||
| 7 | |||
| 8 | //Testing here - https://regex101.com/r/WtnC3m/2 |
||
| 9 | |||
| 10 | private $protocol = '(?:(?:[a-z]+:)?\/\/)'; |
||
| 11 | private $auth = '(?:\\S+(?::\\S*)?@)?'; |
||
| 12 | private $ip = '^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}'; |
||
| 13 | private $tld = "(?<TLD>\.\w+?)(?:$|\/)"; |
||
| 14 | private $tldAlt = '(?:[a-z\\\\u00a1-\\\\uffff]{2,})'; |
||
| 15 | private $host = '(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)'; |
||
| 16 | private $domain = '(?:\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*'; |
||
| 17 | private $port = '(?::\\\\d{2,5})?'; |
||
| 18 | private $path = '(?:[^\s\b\n|]*[^.,;:\?\!\@\^\$ -]*)?'; |
||
| 19 | |||
| 20 | private $standardUrlRegEx = ''; |
||
| 21 | private $stringService; |
||
| 22 | |||
| 23 | public function __construct($options = []) |
||
| 28 | |||
| 29 | private function setUrlRegex() |
||
| 35 | |||
| 36 | function remove($str) |
||
| 40 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.