@@ -2598,11 +2598,11 @@ public function getClientMediaType(): ?string
2598
2598
*/
2599
2599
final class Uri implements UriInterface
2600
2600
{
2601
- private const SCHEMES = ['http ' => 80 , 'https ' => 443 ];
2601
+ /* private*/ const SCHEMES = ['http ' => 80 , 'https ' => 443 ];
2602
2602
2603
- private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~ ' ;
2603
+ /* private*/ const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~ ' ;
2604
2604
2605
- private const CHAR_SUB_DELIMS = '!\$& \'\(\)\*\+,;= ' ;
2605
+ /* private*/ const CHAR_SUB_DELIMS = '!\$& \'\(\)\*\+,;= ' ;
2606
2606
2607
2607
/** @var string Uri scheme. */
2608
2608
private $ scheme = '' ;
@@ -2684,7 +2684,7 @@ public function getHost(): string
2684
2684
return $ this ->host ;
2685
2685
}
2686
2686
2687
- public function getPort (): ?int
2687
+ public function getPort () /*: ?int*/
2688
2688
{
2689
2689
return $ this ->port ;
2690
2690
}
@@ -2852,15 +2852,15 @@ private static function isNonStandardPort(string $scheme, int $port): bool
2852
2852
return !isset (self ::SCHEMES [$ scheme ]) || $ port !== self ::SCHEMES [$ scheme ];
2853
2853
}
2854
2854
2855
- private function filterPort ($ port ): ?int
2855
+ private function filterPort ($ port ) /*: ?int*/
2856
2856
{
2857
2857
if (null === $ port ) {
2858
2858
return null ;
2859
2859
}
2860
2860
2861
2861
$ port = (int ) $ port ;
2862
- if (0 > $ port || 0xffff < $ port ) {
2863
- throw new \InvalidArgumentException (\sprintf ('Invalid port: %d. Must be between 0 and 65535 ' , $ port ));
2862
+ if (1 > $ port || 0xffff < $ port ) {
2863
+ throw new \InvalidArgumentException (\sprintf ('Invalid port: %d. Must be between 1 and 65535 ' , $ port ));
2864
2864
}
2865
2865
2866
2866
return self ::isNonStandardPort ($ this ->scheme , $ port ) ? $ port : null ;
0 commit comments