@@ -977,7 +977,7 @@ public function getContents();
977
977
* provided. Returns a specific key value if a key is provided and the
978
978
* value is found, or null if the key is not found.
979
979
*/
980
- public function getMetadata ( /* ?string*/ $ key = null );
980
+ public function getMetadata (?string $ key = null );
981
981
}
982
982
}
983
983
@@ -1311,7 +1311,7 @@ public function withScheme(string $scheme);
1311
1311
* @param null|string $password The password associated with $user.
1312
1312
* @return static A new instance with the specified user information.
1313
1313
*/
1314
- public function withUserInfo (string $ user , /* ?string*/ $ password = null );
1314
+ public function withUserInfo (string $ user , ?string $ password = null );
1315
1315
1316
1316
/**
1317
1317
* Return an instance with the specified host.
@@ -1344,7 +1344,7 @@ public function withHost(string $host);
1344
1344
* @return static A new instance with the specified port.
1345
1345
* @throws \InvalidArgumentException for invalid ports.
1346
1346
*/
1347
- public function withPort ( /* ?int*/ $ port );
1347
+ public function withPort (?int $ port );
1348
1348
1349
1349
/**
1350
1350
* Return an instance with the specified path.
@@ -1718,7 +1718,7 @@ public function withBody(StreamInterface $body): MessageInterface
1718
1718
return $ new ;
1719
1719
}
1720
1720
1721
- private function setHeaders (array $ headers ) /*: void*/
1721
+ private function setHeaders (array $ headers ): void
1722
1722
{
1723
1723
foreach ($ headers as $ header => $ value ) {
1724
1724
if (\is_int ($ header )) {
@@ -1939,7 +1939,7 @@ public function withUri(UriInterface $uri, $preserveHost = false): RequestInterf
1939
1939
return $ new ;
1940
1940
}
1941
1941
1942
- private function updateHostFromUri () /*: void*/
1942
+ private function updateHostFromUri (): void
1943
1943
{
1944
1944
if ('' === $ host = $ this ->uri ->getHost ()) {
1945
1945
return ;
@@ -1979,7 +1979,7 @@ class Response implements ResponseInterface
1979
1979
use MessageTrait;
1980
1980
1981
1981
/** @var array Map of standard HTTP status code/reason phrases */
1982
- /* private*/ const PHRASES = [
1982
+ private const PHRASES = [
1983
1983
100 => 'Continue ' , 101 => 'Switching Protocols ' , 102 => 'Processing ' ,
1984
1984
200 => 'OK ' , 201 => 'Created ' , 202 => 'Accepted ' , 203 => 'Non-Authoritative Information ' , 204 => 'No Content ' , 205 => 'Reset Content ' , 206 => 'Partial Content ' , 207 => 'Multi-status ' , 208 => 'Already Reported ' ,
1985
1985
300 => 'Multiple Choices ' , 301 => 'Moved Permanently ' , 302 => 'Found ' , 303 => 'See Other ' , 304 => 'Not Modified ' , 305 => 'Use Proxy ' , 306 => 'Switch Proxy ' , 307 => 'Temporary Redirect ' ,
@@ -2289,7 +2289,7 @@ function __toString() {}
2289
2289
private $ size ;
2290
2290
2291
2291
/** @var array Hash of readable and writable stream types */
2292
- /* private*/ const READ_WRITE_HASH = [
2292
+ private const READ_WRITE_HASH = [
2293
2293
'read ' => [
2294
2294
'r ' => true , 'w+ ' => true , 'r+ ' => true , 'x+ ' => true , 'c+ ' => true ,
2295
2295
'rb ' => true , 'w+b ' => true , 'r+b ' => true , 'x+b ' => true ,
@@ -2359,7 +2359,7 @@ public function __destruct()
2359
2359
$ this ->close ();
2360
2360
}
2361
2361
2362
- public function close () /*: void*/
2362
+ public function close (): void
2363
2363
{
2364
2364
if (isset ($ this ->stream )) {
2365
2365
if (\is_resource ($ this ->stream )) {
@@ -2392,7 +2392,7 @@ private function getUri()
2392
2392
return $ this ->uri ;
2393
2393
}
2394
2394
2395
- public function getSize () /*: ?int*/
2395
+ public function getSize (): ?int
2396
2396
{
2397
2397
if (null !== $ this ->size ) {
2398
2398
return $ this ->size ;
@@ -2440,7 +2440,7 @@ public function isSeekable(): bool
2440
2440
return $ this ->seekable ;
2441
2441
}
2442
2442
2443
- public function seek ($ offset , $ whence = \SEEK_SET ) /*: void*/
2443
+ public function seek ($ offset , $ whence = \SEEK_SET ): void
2444
2444
{
2445
2445
if (!isset ($ this ->stream )) {
2446
2446
throw new \RuntimeException ('Stream is detached ' );
@@ -2455,7 +2455,7 @@ public function seek($offset, $whence = \SEEK_SET) /*:void*/
2455
2455
}
2456
2456
}
2457
2457
2458
- public function rewind () /*: void*/
2458
+ public function rewind (): void
2459
2459
{
2460
2460
$ this ->seek (0 );
2461
2461
}
@@ -2715,7 +2715,7 @@ public function __toString()
2715
2715
class UploadedFile implements UploadedFileInterface
2716
2716
{
2717
2717
/** @var array */
2718
- /* private*/ const ERRORS = [
2718
+ private const ERRORS = [
2719
2719
\UPLOAD_ERR_OK => 1 ,
2720
2720
\UPLOAD_ERR_INI_SIZE => 1 ,
2721
2721
\UPLOAD_ERR_FORM_SIZE => 1 ,
@@ -2794,7 +2794,7 @@ public function __construct($streamOrFile, $size, $errorStatus, $clientFilename
2794
2794
/**
2795
2795
* @throws \RuntimeException if is moved or not ok
2796
2796
*/
2797
- private function validateActive () /*: void*/
2797
+ private function validateActive (): void
2798
2798
{
2799
2799
if (\UPLOAD_ERR_OK !== $ this ->error ) {
2800
2800
throw new \RuntimeException ('Cannot retrieve stream due to upload error ' );
@@ -2820,7 +2820,7 @@ public function getStream(): StreamInterface
2820
2820
return Stream::create ($ resource );
2821
2821
}
2822
2822
2823
- public function moveTo ($ targetPath ) /*: void*/
2823
+ public function moveTo ($ targetPath ): void
2824
2824
{
2825
2825
$ this ->validateActive ();
2826
2826
@@ -2866,12 +2866,12 @@ public function getError(): int
2866
2866
return $ this ->error ;
2867
2867
}
2868
2868
2869
- public function getClientFilename () /*: ?string*/
2869
+ public function getClientFilename (): ?string
2870
2870
{
2871
2871
return $ this ->clientFilename ;
2872
2872
}
2873
2873
2874
- public function getClientMediaType () /*: ?string*/
2874
+ public function getClientMediaType (): ?string
2875
2875
{
2876
2876
return $ this ->clientMediaType ;
2877
2877
}
@@ -2896,13 +2896,13 @@ public function getClientMediaType() /*:?string*/
2896
2896
*/
2897
2897
class Uri implements UriInterface
2898
2898
{
2899
- /* private*/ const SCHEMES = ['http ' => 80 , 'https ' => 443 ];
2899
+ private const SCHEMES = ['http ' => 80 , 'https ' => 443 ];
2900
2900
2901
- /* private*/ const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~ ' ;
2901
+ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~ ' ;
2902
2902
2903
- /* private*/ const CHAR_SUB_DELIMS = '!\$& \'\(\)\*\+,;= ' ;
2903
+ private const CHAR_SUB_DELIMS = '!\$& \'\(\)\*\+,;= ' ;
2904
2904
2905
- /* private*/ const CHAR_GEN_DELIMS = ':\/\?#\[\]@ ' ;
2905
+ private const CHAR_GEN_DELIMS = ':\/\?#\[\]@ ' ;
2906
2906
2907
2907
/** @var string Uri scheme. */
2908
2908
private $ scheme = '' ;
@@ -2984,7 +2984,7 @@ public function getHost(): string
2984
2984
return $ this ->host ;
2985
2985
}
2986
2986
2987
- public function getPort () /*: ?int*/
2987
+ public function getPort (): ?int
2988
2988
{
2989
2989
return $ this ->port ;
2990
2990
}
@@ -3194,7 +3194,7 @@ private static function isNonStandardPort(string $scheme, int $port): bool
3194
3194
return !isset (self ::SCHEMES [$ scheme ]) || $ port !== self ::SCHEMES [$ scheme ];
3195
3195
}
3196
3196
3197
- private function filterPort ($ port ) /*: ?int*/
3197
+ private function filterPort ($ port ): ?int
3198
3198
{
3199
3199
if (null === $ port ) {
3200
3200
return null ;
0 commit comments