@@ -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 | } |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | { |
| 397 | 397 | return preg_replace_callback( |
| 398 | 398 | '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=]+|%(?![A-Fa-f0-9]{2}))/u', |
| 399 | - function ($match) { |
|
| 399 | + function($match) { |
|
| 400 | 400 | return rawurlencode($match[0]); |
| 401 | 401 | }, |
| 402 | 402 | $query |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | { |
| 642 | 642 | return preg_replace_callback( |
| 643 | 643 | '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', |
| 644 | - function ($match) { |
|
| 644 | + function($match) { |
|
| 645 | 645 | return rawurlencode($match[0]); |
| 646 | 646 | }, |
| 647 | 647 | $path |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | { |
| 715 | 715 | return preg_replace_callback( |
| 716 | 716 | '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', |
| 717 | - function ($match) { |
|
| 717 | + function($match) { |
|
| 718 | 718 | return rawurlencode($match[0]); |
| 719 | 719 | }, |
| 720 | 720 | $query |