@@ -186,12 +186,12 @@ discard block |
||
| 186 | 186 | $host = $matches[1]; |
| 187 | 187 | |
| 188 | 188 | if (isset($matches[2])) { |
| 189 | - $port = (int) substr($matches[2], 1); |
|
| 189 | + $port = (int)substr($matches[2], 1); |
|
| 190 | 190 | } |
| 191 | 191 | } else { |
| 192 | 192 | $pos = strpos($host, ':'); |
| 193 | 193 | if ($pos !== false) { |
| 194 | - $port = (int) substr($host, $pos + 1); |
|
| 194 | + $port = (int)substr($host, $pos + 1); |
|
| 195 | 195 | $host = strstr($host, ':', true); |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | { |
| 623 | 623 | return preg_replace_callback( |
| 624 | 624 | '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', |
| 625 | - function ($match) { |
|
| 625 | + function($match) { |
|
| 626 | 626 | return rawurlencode($match[0]); |
| 627 | 627 | }, |
| 628 | 628 | $path |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | { |
| 696 | 696 | return preg_replace_callback( |
| 697 | 697 | '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', |
| 698 | - function ($match) { |
|
| 698 | + function($match) { |
|
| 699 | 699 | return rawurlencode($match[0]); |
| 700 | 700 | }, |
| 701 | 701 | $query |