@@ -1685,7 +1685,7 @@ public function withBody(StreamInterface $body): self
1685
1685
return $ new ;
1686
1686
}
1687
1687
1688
- private function setHeaders (array $ headers ): void
1688
+ private function setHeaders (array $ headers ) /*: void*/
1689
1689
{
1690
1690
foreach ($ headers as $ header => $ value ) {
1691
1691
$ value = $ this ->validateAndTrimHeader ($ header , $ value );
@@ -1885,7 +1885,7 @@ public function withUri(UriInterface $uri, $preserveHost = false): self
1885
1885
return $ new ;
1886
1886
}
1887
1887
1888
- private function updateHostFromUri (): void
1888
+ private function updateHostFromUri () /*: void*/
1889
1889
{
1890
1890
if ('' === $ host = $ this ->uri ->getHost ()) {
1891
1891
return ;
@@ -1923,7 +1923,7 @@ final class Response implements ResponseInterface
1923
1923
use MessageTrait;
1924
1924
1925
1925
/** @var array Map of standard HTTP status code/reason phrases */
1926
- private const PHRASES = [
1926
+ /* private*/ const PHRASES = [
1927
1927
100 => 'Continue ' , 101 => 'Switching Protocols ' , 102 => 'Processing ' ,
1928
1928
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 ' ,
1929
1929
300 => 'Multiple Choices ' , 301 => 'Moved Permanently ' , 302 => 'Found ' , 303 => 'See Other ' , 304 => 'Not Modified ' , 305 => 'Use Proxy ' , 306 => 'Switch Proxy ' , 307 => 'Temporary Redirect ' ,
@@ -2187,7 +2187,7 @@ final class Stream implements StreamInterface
2187
2187
private $ size ;
2188
2188
2189
2189
/** @var array Hash of readable and writable stream types */
2190
- private const READ_WRITE_HASH = [
2190
+ /* private*/ const READ_WRITE_HASH = [
2191
2191
'read ' => [
2192
2192
'r ' => true , 'w+ ' => true , 'r+ ' => true , 'x+ ' => true , 'c+ ' => true ,
2193
2193
'rb ' => true , 'w+b ' => true , 'r+b ' => true , 'x+b ' => true ,
@@ -2263,7 +2263,7 @@ public function __toString(): string
2263
2263
}
2264
2264
}
2265
2265
2266
- public function close (): void
2266
+ public function close () /*: void*/
2267
2267
{
2268
2268
if (isset ($ this ->stream )) {
2269
2269
if (\is_resource ($ this ->stream )) {
@@ -2287,7 +2287,7 @@ public function detach()
2287
2287
return $ result ;
2288
2288
}
2289
2289
2290
- public function getSize (): ?int
2290
+ public function getSize () /*: ?int*/
2291
2291
{
2292
2292
if (null !== $ this ->size ) {
2293
2293
return $ this ->size ;
@@ -2331,7 +2331,7 @@ public function isSeekable(): bool
2331
2331
return $ this ->seekable ;
2332
2332
}
2333
2333
2334
- public function seek ($ offset , $ whence = \SEEK_SET ): void
2334
+ public function seek ($ offset , $ whence = \SEEK_SET ) /*: void*/
2335
2335
{
2336
2336
if (!$ this ->seekable ) {
2337
2337
throw new \RuntimeException ('Stream is not seekable ' );
@@ -2342,7 +2342,7 @@ public function seek($offset, $whence = \SEEK_SET): void
2342
2342
}
2343
2343
}
2344
2344
2345
- public function rewind (): void
2345
+ public function rewind () /*: void*/
2346
2346
{
2347
2347
$ this ->seek (0 );
2348
2348
}
@@ -2425,7 +2425,7 @@ public function getMetadata($key = null)
2425
2425
final class UploadedFile implements UploadedFileInterface
2426
2426
{
2427
2427
/** @var array */
2428
- private const ERRORS = [
2428
+ /* private*/ const ERRORS = [
2429
2429
\UPLOAD_ERR_OK => 1 ,
2430
2430
\UPLOAD_ERR_INI_SIZE => 1 ,
2431
2431
\UPLOAD_ERR_FORM_SIZE => 1 ,
@@ -2504,7 +2504,7 @@ public function __construct($streamOrFile, $size, $errorStatus, $clientFilename
2504
2504
/**
2505
2505
* @throws \RuntimeException if is moved or not ok
2506
2506
*/
2507
- private function validateActive (): void
2507
+ private function validateActive () /*: void*/
2508
2508
{
2509
2509
if (\UPLOAD_ERR_OK !== $ this ->error ) {
2510
2510
throw new \RuntimeException ('Cannot retrieve stream due to upload error ' );
@@ -2528,7 +2528,7 @@ public function getStream(): StreamInterface
2528
2528
return Stream::create ($ resource );
2529
2529
}
2530
2530
2531
- public function moveTo ($ targetPath ): void
2531
+ public function moveTo ($ targetPath ) /*: void*/
2532
2532
{
2533
2533
$ this ->validateActive ();
2534
2534
@@ -2570,12 +2570,12 @@ public function getError(): int
2570
2570
return $ this ->error ;
2571
2571
}
2572
2572
2573
- public function getClientFilename (): ?string
2573
+ public function getClientFilename () /*: ?string*/
2574
2574
{
2575
2575
return $ this ->clientFilename ;
2576
2576
}
2577
2577
2578
- public function getClientMediaType (): ?string
2578
+ public function getClientMediaType () /*: ?string*/
2579
2579
{
2580
2580
return $ this ->clientMediaType ;
2581
2581
}
@@ -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,7 +2852,7 @@ 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 ;
0 commit comments