@@ -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 | * |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | use InvalidArgumentException; |
| 51 | 51 | |
| 52 | -class Response extends Message implements ResponseInterface |
|
| 53 | -{ |
|
| 52 | +class Response extends Message implements ResponseInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * The reason phrases. |
| 56 | 55 | */ |
@@ -150,8 +149,7 @@ discard block |
||
| 150 | 149 | * @param int $statusCode |
| 151 | 150 | * @param string $reasonPhrase |
| 152 | 151 | */ |
| 153 | - public function __construct(int $statusCode = 200, string $reasonPhrase = '') |
|
| 154 | - { |
|
| 152 | + public function __construct(int $statusCode = 200, string $reasonPhrase = '') { |
|
| 155 | 153 | $this->statusCode = $this->filterStatusCode($statusCode); |
| 156 | 154 | if ($reasonPhrase === '') { |
| 157 | 155 | $reasonPhrase = isset(static::REASON_PHRASES[$this->statusCode]) |
@@ -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 | * |
@@ -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 | * |
@@ -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 | * |
@@ -47,8 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | namespace Platine\Http; |
| 49 | 49 | |
| 50 | -class Uri implements UriInterface |
|
| 51 | -{ |
|
| 50 | +class Uri implements UriInterface { |
|
| 52 | 51 | /** |
| 53 | 52 | * The Uri scheme |
| 54 | 53 | * @var string |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | * Create new Uri instance |
| 96 | 95 | * @param string $uri |
| 97 | 96 | */ |
| 98 | - public function __construct(string $uri = '') |
|
| 99 | - { |
|
| 97 | + public function __construct(string $uri = '') { |
|
| 100 | 98 | if ($uri !== '') { |
| 101 | 99 | $parts = parse_url($uri); |
| 102 | 100 | |
@@ -51,8 +51,7 @@ discard block |
||
| 51 | 51 | use InvalidArgumentException; |
| 52 | 52 | use RuntimeException; |
| 53 | 53 | |
| 54 | -class Stream implements StreamInterface |
|
| 55 | -{ |
|
| 54 | +class Stream implements StreamInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * The writable stream modes. |
| 58 | 57 | */ |
@@ -99,8 +98,7 @@ discard block |
||
| 99 | 98 | * @param string $mode the stream mode |
| 100 | 99 | * @param array<string, mixed> $options the stream options |
| 101 | 100 | */ |
| 102 | - public function __construct($content = '', string $mode = 'r+', array $options = []) |
|
| 103 | - { |
|
| 101 | + public function __construct($content = '', string $mode = 'r+', array $options = []) { |
|
| 104 | 102 | if (is_string($content)) { |
| 105 | 103 | if (is_file($content) || strpos($content, 'php://') === 0) { |
| 106 | 104 | $mode = $this->filterMode($mode); |
@@ -193,8 +191,7 @@ discard block |
||
| 193 | 191 | /** |
| 194 | 192 | * {@inheritdoc} |
| 195 | 193 | */ |
| 196 | - public function detach() |
|
| 197 | - { |
|
| 194 | + public function detach() { |
|
| 198 | 195 | $resource = $this->resource; |
| 199 | 196 | if ($resource !== null) { |
| 200 | 197 | $this->resource = null; |
@@ -361,8 +358,7 @@ discard block |
||
| 361 | 358 | /** |
| 362 | 359 | * {@inheritdoc} |
| 363 | 360 | */ |
| 364 | - public function getMetadata(string $key = null) |
|
| 365 | - { |
|
| 361 | + public function getMetadata(string $key = null) { |
|
| 366 | 362 | if ($this->resource === null) { |
| 367 | 363 | throw new RuntimeException('Stream resource is detached'); |
| 368 | 364 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | namespace Platine\Http; |
| 49 | 49 | |
| 50 | -class UploadedFile implements UploadedFileInterface |
|
| 51 | -{ |
|
| 50 | +class UploadedFile implements UploadedFileInterface { |
|
| 52 | 51 | /** |
| 53 | 52 | * The uploaded file name |
| 54 | 53 | * @var string |