@@ -136,7 +136,7 @@ |
||
| 136 | 136 | : (!empty($meta['seekable']) |
| 137 | 137 | ? $meta['seekable'] |
| 138 | 138 | : false |
| 139 | - ); |
|
| 139 | + ); |
|
| 140 | 140 | |
| 141 | 141 | if (isset($options['writable']) && is_bool($options['writable'])) { |
| 142 | 142 | $this->writable = $options['writable']; |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | * @class Stream |
| 56 | 56 | * @package Platine\Http |
| 57 | 57 | */ |
| 58 | -class Stream implements StreamInterface |
|
| 59 | -{ |
|
| 58 | +class Stream implements StreamInterface { |
|
| 60 | 59 | /** |
| 61 | 60 | * The writable stream modes. |
| 62 | 61 | */ |
@@ -207,8 +206,7 @@ discard block |
||
| 207 | 206 | /** |
| 208 | 207 | * {@inheritdoc} |
| 209 | 208 | */ |
| 210 | - public function detach() |
|
| 211 | - { |
|
| 209 | + public function detach() { |
|
| 212 | 210 | $resource = $this->resource; |
| 213 | 211 | if ($resource !== null) { |
| 214 | 212 | $this->resource = null; |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * a wrapper around the most common operations, including serialization of |
| 55 | 55 | * the entire stream to a string. |
| 56 | 56 | */ |
| 57 | -interface StreamInterface |
|
| 58 | -{ |
|
| 57 | +interface StreamInterface { |
|
| 59 | 58 | /** |
| 60 | 59 | * Reads all data from the stream into a string, from the beginning to end. |
| 61 | 60 | * |
@@ -87,8 +87,7 @@ |
||
| 87 | 87 | * be implemented such that they retain the internal state of the current |
| 88 | 88 | * message and return an instance that contains the changed state. |
| 89 | 89 | */ |
| 90 | -interface ServerRequestInterface extends RequestInterface |
|
| 91 | -{ |
|
| 90 | +interface ServerRequestInterface extends RequestInterface { |
|
| 92 | 91 | /** |
| 93 | 92 | * Retrieve server parameters. |
| 94 | 93 | * |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @return null|array<string, mixed>|object The deserialized body parameters, if any. |
| 220 | 220 | * These will typically be an array or object. |
| 221 | 221 | */ |
| 222 | - public function getParsedBody(): array|object|null; |
|
| 222 | + public function getParsedBody(): array | object | null; |
|
| 223 | 223 | |
| 224 | 224 | /** |
| 225 | 225 | * Return an instance with the specified body parameters. |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * @throws InvalidArgumentException if an unsupported argument type is |
| 252 | 252 | * provided. |
| 253 | 253 | */ |
| 254 | - public function withParsedBody(array|object|null $data): self; |
|
| 254 | + public function withParsedBody(array | object | null $data): self; |
|
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | 257 | * Retrieve attributes derived from the request. |
@@ -68,8 +68,7 @@ |
||
| 68 | 68 | * be implemented such that they retain the internal state of the current |
| 69 | 69 | * message and return an instance that contains the changed state. |
| 70 | 70 | */ |
| 71 | -interface RequestInterface extends MessageInterface |
|
| 72 | -{ |
|
| 71 | +interface RequestInterface extends MessageInterface { |
|
| 73 | 72 | /** |
| 74 | 73 | * Retrieves the message's request target. |
| 75 | 74 | * |
@@ -61,8 +61,7 @@ |
||
| 61 | 61 | * @see http://www.ietf.org/rfc/rfc7230.txt |
| 62 | 62 | * @see http://www.ietf.org/rfc/rfc7231.txt |
| 63 | 63 | */ |
| 64 | -interface MessageInterface |
|
| 65 | -{ |
|
| 64 | +interface MessageInterface { |
|
| 66 | 65 | /** |
| 67 | 66 | * Retrieves the HTTP protocol version as a string. |
| 68 | 67 | * |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * @return $this |
| 180 | 180 | * @throws InvalidArgumentException for invalid header names or values. |
| 181 | 181 | */ |
| 182 | - public function withHeader(string $name, string|array $value): self; |
|
| 182 | + public function withHeader(string $name, string | array $value): self; |
|
| 183 | 183 | |
| 184 | 184 | /** |
| 185 | 185 | * Return an instance with the specified header appended with the given value. |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @throws InvalidArgumentException for invalid header names. |
| 199 | 199 | * @throws InvalidArgumentException for invalid header values. |
| 200 | 200 | */ |
| 201 | - public function withAddedHeader(string $name, string|array $value): self; |
|
| 201 | + public function withAddedHeader(string $name, string | array $value): self; |
|
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | 204 | * Return an instance without the specified header. |
@@ -62,8 +62,7 @@ |
||
| 62 | 62 | * be implemented such that they retain the internal state of the current |
| 63 | 63 | * message and return an instance that contains the changed state. |
| 64 | 64 | */ |
| 65 | -interface ResponseInterface extends MessageInterface |
|
| 66 | -{ |
|
| 65 | +interface ResponseInterface extends MessageInterface { |
|
| 67 | 66 | /** |
| 68 | 67 | * Gets the response status code. |
| 69 | 68 | * |
@@ -124,9 +124,9 @@ |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | - * Create uploaded file from global variable $_FILES |
|
| 128 | - * @return array<mixed> |
|
| 129 | - */ |
|
| 127 | + * Create uploaded file from global variable $_FILES |
|
| 128 | + * @return array<mixed> |
|
| 129 | + */ |
|
| 130 | 130 | public static function createFromGlobals(): array |
| 131 | 131 | { |
| 132 | 132 | return static::normalize($_FILES); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | * @param string|null $clientMediaType |
| 109 | 109 | */ |
| 110 | 110 | public function __construct( |
| 111 | - string|StreamInterface $filenameOrStream, |
|
| 111 | + string | StreamInterface $filenameOrStream, |
|
| 112 | 112 | ?int $size = null, |
| 113 | 113 | int $error = UPLOAD_ERR_OK, |
| 114 | 114 | ?string $clientFilename = null, |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class UploadedFile |
| 55 | 55 | * @package Platine\Http |
| 56 | 56 | */ |
| 57 | -class UploadedFile implements UploadedFileInterface |
|
| 58 | -{ |
|
| 57 | +class UploadedFile implements UploadedFileInterface { |
|
| 59 | 58 | /** |
| 60 | 59 | * The uploaded file name |
| 61 | 60 | * @var string |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * state of the current instance and return an instance that contains the |
| 56 | 56 | * changed state. |
| 57 | 57 | */ |
| 58 | -interface UploadedFileInterface |
|
| 59 | -{ |
|
| 58 | +interface UploadedFileInterface { |
|
| 60 | 59 | /** |
| 61 | 60 | * Retrieve a stream representing the uploaded file. |
| 62 | 61 | * |
@@ -67,8 +67,7 @@ |
||
| 67 | 67 | * |
| 68 | 68 | * @see http://tools.ietf.org/html/rfc3986 (the URI specification) |
| 69 | 69 | */ |
| 70 | -interface UriInterface |
|
| 71 | -{ |
|
| 70 | +interface UriInterface { |
|
| 72 | 71 | /** |
| 73 | 72 | * Retrieve the scheme component of the URI. |
| 74 | 73 | * |