@@ -34,7 +34,7 @@ |
||
34 | 34 | extract(SuperGlobal::extract()); |
35 | 35 | |
36 | 36 | $protocol = $server['SERVER_PROTOCOL'] ?? '1.1'; |
37 | - $protocol = str_replace('HTTP/', '', $protocol); |
|
37 | + $protocol = str_replace('HTTP/', '', $protocol); |
|
38 | 38 | |
39 | 39 | $streamFactory = new streamFactory(); |
40 | 40 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | extract(SuperGlobal::extract()); |
36 | 36 | |
37 | 37 | $protocol = $server['SERVER_PROTOCOL'] ?? '1.1'; |
38 | - $protocol = str_replace('HTTP/', '', $protocol); |
|
38 | + $protocol = str_replace('HTTP/', '', $protocol); |
|
39 | 39 | |
40 | 40 | $uriFactory = new UriFactory(); |
41 | 41 | $streamFactory = new StreamFactory(); |
@@ -70,10 +70,10 @@ |
||
70 | 70 | */ |
71 | 71 | public static function mockCliEnvironment(array $server = []): void |
72 | 72 | { |
73 | - $_POST = $_POST ?? []; |
|
73 | + $_POST = $_POST ?? []; |
|
74 | 74 | $_COOKIE = $_COOKIE ?? []; |
75 | - $_GET = $_GET ?? []; |
|
76 | - $_FILES = $_FILES ?? []; |
|
75 | + $_GET = $_GET ?? []; |
|
76 | + $_FILES = $_FILES ?? []; |
|
77 | 77 | $_SERVER = $_SERVER ?? []; |
78 | 78 | |
79 | 79 | $defaultServerParams = [ |
@@ -25,5 +25,5 @@ |
||
25 | 25 | /** |
26 | 26 | * {@inheritdoc} |
27 | 27 | */ |
28 | - abstract function process(ServerRequestInterface $request,RequestHandlerInterface $handler): ResponseInterface; |
|
28 | + abstract function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface; |
|
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -141,9 +141,9 @@ |
||
141 | 141 | * @param string $reason Reaspnse HTTP reason phrase. |
142 | 142 | */ |
143 | 143 | public function __construct( |
144 | - int $status = 200 , |
|
145 | - array $headers = [] , |
|
146 | - $body = '' , |
|
144 | + int $status = 200, |
|
145 | + array $headers = [], |
|
146 | + $body = '', |
|
147 | 147 | string $version = '1.1', |
148 | 148 | string $reason = 'OK' |
149 | 149 | ) { |
@@ -107,9 +107,9 @@ |
||
107 | 107 | */ |
108 | 108 | public function __construct( |
109 | 109 | string $method = 'GET', |
110 | - $uri = '' , |
|
111 | - $body = '' , |
|
112 | - array $headers = [] , |
|
110 | + $uri = '', |
|
111 | + $body = '', |
|
112 | + array $headers = [], |
|
113 | 113 | string $version = '1.1' |
114 | 114 | ) { |
115 | 115 | $this->assertMethod($method); |
@@ -94,14 +94,14 @@ |
||
94 | 94 | */ |
95 | 95 | public function __construct( |
96 | 96 | string $method = 'GET', |
97 | - $uri = '' , |
|
98 | - $body = '' , |
|
99 | - array $headers = [] , |
|
97 | + $uri = '', |
|
98 | + $body = '', |
|
99 | + array $headers = [], |
|
100 | 100 | string $version = '1.1', |
101 | - array $serverParams = [] , |
|
102 | - array $cookieParams = [] , |
|
103 | - array $postParams = [] , |
|
104 | - array $getParams = [] , |
|
101 | + array $serverParams = [], |
|
102 | + array $cookieParams = [], |
|
103 | + array $postParams = [], |
|
104 | + array $getParams = [], |
|
105 | 105 | array $filesParams = [] |
106 | 106 | ) { |
107 | 107 | parent::__construct($method, $uri, $body, $headers, $version); |
@@ -282,7 +282,7 @@ |
||
282 | 282 | $num = count($headers); |
283 | 283 | |
284 | 284 | if ($num > 1) { |
285 | - $headers = array_merge(...array_map(function ($line) { |
|
285 | + $headers = array_merge(...array_map(function($line) { |
|
286 | 286 | $name = trim($line[1]); |
287 | 287 | $field = trim($line[2]); |
288 | 288 | return [$name => $field]; |
@@ -110,11 +110,11 @@ |
||
110 | 110 | * @param string|null $sapi Only assign for unit testing purpose. |
111 | 111 | */ |
112 | 112 | public function __construct( |
113 | - $source , |
|
113 | + $source, |
|
114 | 114 | ?string $name = null, |
115 | 115 | ?string $type = null, |
116 | 116 | ?int $size = null, |
117 | - int $error = 0 , |
|
117 | + int $error = 0, |
|
118 | 118 | ?string $sapi = null |
119 | 119 | ) { |
120 | 120 |