@@ -84,8 +84,7 @@ |
||
84 | 84 | * be implemented such that they retain the internal state of the current |
85 | 85 | * message and return an instance that contains the changed state. |
86 | 86 | */ |
87 | -interface ServerRequestInterface extends RequestInterface |
|
88 | -{ |
|
87 | +interface ServerRequestInterface extends RequestInterface { |
|
89 | 88 | |
90 | 89 | /** |
91 | 90 | * Retrieve server parameters. |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * state of the current instance and return an instance that contains the |
55 | 55 | * changed state. |
56 | 56 | */ |
57 | -interface UploadedFileInterface |
|
58 | -{ |
|
57 | +interface UploadedFileInterface { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * Retrieve a stream representing the uploaded file. |
@@ -66,8 +66,7 @@ |
||
66 | 66 | * |
67 | 67 | * @see http://tools.ietf.org/html/rfc3986 (the URI specification) |
68 | 68 | */ |
69 | -interface UriInterface |
|
70 | -{ |
|
69 | +interface UriInterface { |
|
71 | 70 | |
72 | 71 | /** |
73 | 72 | * Retrieve the scheme component of the URI. |
@@ -46,8 +46,7 @@ |
||
46 | 46 | |
47 | 47 | namespace Platine\Http; |
48 | 48 | |
49 | -abstract class Message implements MessageInterface |
|
50 | -{ |
|
49 | +abstract class Message implements MessageInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * The message protocol version. |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * a wrapper around the most common operations, including serialization of |
54 | 54 | * the entire stream to a string. |
55 | 55 | */ |
56 | -interface StreamInterface |
|
57 | -{ |
|
56 | +interface StreamInterface { |
|
58 | 57 | |
59 | 58 | /** |
60 | 59 | * Reads all data from the stream into a string, from the beginning to end. |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | } |
509 | 509 | return preg_replace_callback( |
510 | 510 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/%]++|%(?![a-fA-F0-9]{2}))/', |
511 | - function ($matches) { |
|
511 | + function($matches) { |
|
512 | 512 | return rawurlencode($matches[0]); |
513 | 513 | }, |
514 | 514 | $path |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | } |
539 | 539 | return preg_replace_callback( |
540 | 540 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/?%]++|%(?![a-fA-F0-9]{2}))/', |
541 | - function ($matches) { |
|
541 | + function($matches) { |
|
542 | 542 | return rawurlencode($matches[0]); |
543 | 543 | }, |
544 | 544 | $query |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | if ($fragment !== '') { |
559 | 559 | return preg_replace_callback( |
560 | 560 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/?%]++|%(?![a-fA-F0-9]{2}))/', |
561 | - function ($matches) { |
|
561 | + function($matches) { |
|
562 | 562 | return rawurlencode($matches[0]); |
563 | 563 | }, |
564 | 564 | $fragment |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | namespace Platine\Http; |
48 | 48 | |
49 | -class Uri implements UriInterface |
|
50 | -{ |
|
49 | +class Uri implements UriInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * The Uri scheme |
@@ -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 |
@@ -46,8 +46,7 @@ |
||
46 | 46 | |
47 | 47 | namespace Platine\Http; |
48 | 48 | |
49 | -class UploadedFile implements UploadedFileInterface |
|
50 | -{ |
|
49 | +class UploadedFile implements UploadedFileInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * The uploaded file name |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | namespace Platine\Http; |
48 | 48 | |
49 | -class Response extends Message implements ResponseInterface |
|
50 | -{ |
|
49 | +class Response extends Message implements ResponseInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * The reason phrases. |
@@ -148,8 +147,7 @@ discard block |
||
148 | 147 | * @param int $statusCode |
149 | 148 | * @param string $reasonPhrase |
150 | 149 | */ |
151 | - public function __construct(int $statusCode = 200, string $reasonPhrase = '') |
|
152 | - { |
|
150 | + public function __construct(int $statusCode = 200, string $reasonPhrase = '') { |
|
153 | 151 | $this->statusCode = $this->filterStatusCode($statusCode); |
154 | 152 | if ($reasonPhrase === '') { |
155 | 153 | $reasonPhrase = isset(static::REASON_PHRASES[$this->statusCode]) |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | namespace Platine\Http; |
48 | 48 | |
49 | -class Request extends Message implements RequestInterface |
|
50 | -{ |
|
49 | +class Request extends Message implements RequestInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * The request target |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * @param string $method the HTTP request method |
73 | 72 | * @param UriInterface|string|null $uri the request Uri |
74 | 73 | */ |
75 | - public function __construct(string $method = 'GET', $uri = null) |
|
76 | - { |
|
74 | + public function __construct(string $method = 'GET', $uri = null) { |
|
77 | 75 | $this->method = $this->filterMethod($method); |
78 | 76 | if ($uri === null) { |
79 | 77 | $uri = new Uri(); |