@@ -47,8 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | namespace Platine\Http; |
| 49 | 49 | |
| 50 | -class ServerRequest extends Request implements ServerRequestInterface |
|
| 51 | -{ |
|
| 50 | +class ServerRequest extends Request implements ServerRequestInterface { |
|
| 52 | 51 | |
| 53 | 52 | /** |
| 54 | 53 | * The array of servers params |
@@ -215,8 +214,7 @@ discard block |
||
| 215 | 214 | /** |
| 216 | 215 | * {@inheritdoc} |
| 217 | 216 | */ |
| 218 | - public function getParsedBody() |
|
| 219 | - { |
|
| 217 | + public function getParsedBody() { |
|
| 220 | 218 | return $this->parsedBody; |
| 221 | 219 | } |
| 222 | 220 | |
@@ -242,8 +240,7 @@ discard block |
||
| 242 | 240 | /** |
| 243 | 241 | * {@inheritdoc} |
| 244 | 242 | */ |
| 245 | - public function getAttribute(string $name, $default = null) |
|
| 246 | - { |
|
| 243 | + public function getAttribute(string $name, $default = null) { |
|
| 247 | 244 | return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; |
| 248 | 245 | } |
| 249 | 246 | |
@@ -296,8 +293,7 @@ discard block |
||
| 296 | 293 | * @param object|array|null $data the parsed body |
| 297 | 294 | * @return mixed |
| 298 | 295 | */ |
| 299 | - protected function filterParsedBody($data) |
|
| 300 | - { |
|
| 296 | + protected function filterParsedBody($data) { |
|
| 301 | 297 | if ($data !== null && !is_array($data) && !is_object($data)) { |
| 302 | 298 | throw new \InvalidArgumentException('Invalid parsed body! Parsed body must be an array or an object'); |
| 303 | 299 | } |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | * be implemented such that they retain the internal state of the current |
| 66 | 66 | * message and return an instance that contains the changed state. |
| 67 | 67 | */ |
| 68 | -interface RequestInterface extends MessageInterface |
|
| 69 | -{ |
|
| 68 | +interface RequestInterface extends MessageInterface { |
|
| 70 | 69 | |
| 71 | 70 | /** |
| 72 | 71 | * Retrieves the message's request target. |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | namespace Platine\Http; |
| 48 | 48 | |
| 49 | -class Stream implements StreamInterface |
|
| 50 | -{ |
|
| 49 | +class Stream implements StreamInterface { |
|
| 51 | 50 | |
| 52 | 51 | /** |
| 53 | 52 | * The writable stream modes. |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | * @param string $mode the stream mode |
| 96 | 95 | * @param array $options the stream options |
| 97 | 96 | */ |
| 98 | - public function __construct($content = '', string $mode = 'r+', array $options = []) |
|
| 99 | - { |
|
| 97 | + public function __construct($content = '', string $mode = 'r+', array $options = []) { |
|
| 100 | 98 | if (is_string($content)) { |
| 101 | 99 | if (is_file($content) || strpos($content, 'php://') === 0) { |
| 102 | 100 | $mode = $this->filterMode($mode); |
@@ -189,8 +187,7 @@ discard block |
||
| 189 | 187 | /** |
| 190 | 188 | * {@inheritdoc} |
| 191 | 189 | */ |
| 192 | - public function detach() |
|
| 193 | - { |
|
| 190 | + public function detach() { |
|
| 194 | 191 | $resource = $this->resource; |
| 195 | 192 | if ($resource !== null) { |
| 196 | 193 | $this->resource = null; |
@@ -357,8 +354,7 @@ discard block |
||
| 357 | 354 | /** |
| 358 | 355 | * {@inheritdoc} |
| 359 | 356 | */ |
| 360 | - public function getMetadata(string $key = null) |
|
| 361 | - { |
|
| 357 | + public function getMetadata(string $key = null) { |
|
| 362 | 358 | $meta = stream_get_meta_data($this->resource); |
| 363 | 359 | if ($key === null) { |
| 364 | 360 | return $meta; |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | * @see http://www.ietf.org/rfc/rfc7230.txt |
| 59 | 59 | * @see http://www.ietf.org/rfc/rfc7231.txt |
| 60 | 60 | */ |
| 61 | -interface MessageInterface |
|
| 62 | -{ |
|
| 61 | +interface MessageInterface { |
|
| 63 | 62 | |
| 64 | 63 | /** |
| 65 | 64 | * Retrieves the HTTP protocol version as a string. |