@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->headers->set('Host', $this->uri->getHost()); |
202 | 202 | } |
203 | 203 | |
204 | - $this->registerMediaTypeParser('application/json', function ($input) { |
|
204 | + $this->registerMediaTypeParser('application/json', function($input) { |
|
205 | 205 | $result = json_decode($input, true); |
206 | 206 | if (!is_array($result)) { |
207 | 207 | return null; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | return $result; |
210 | 210 | }); |
211 | 211 | |
212 | - $this->registerMediaTypeParser('application/xml', function ($input) { |
|
212 | + $this->registerMediaTypeParser('application/xml', function($input) { |
|
213 | 213 | $backup = libxml_disable_entity_loader(true); |
214 | 214 | $backup_errors = libxml_use_internal_errors(true); |
215 | 215 | $result = simplexml_load_string($input); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | return $result; |
223 | 223 | }); |
224 | 224 | |
225 | - $this->registerMediaTypeParser('text/xml', function ($input) { |
|
225 | + $this->registerMediaTypeParser('text/xml', function($input) { |
|
226 | 226 | $backup = libxml_disable_entity_loader(true); |
227 | 227 | $backup_errors = libxml_use_internal_errors(true); |
228 | 228 | $result = simplexml_load_string($input); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | return $result; |
236 | 236 | }); |
237 | 237 | |
238 | - $this->registerMediaTypeParser('application/x-www-form-urlencoded', function ($input) { |
|
238 | + $this->registerMediaTypeParser('application/x-www-form-urlencoded', function($input) { |
|
239 | 239 | parse_str($input, $data); |
240 | 240 | return $data; |
241 | 241 | }); |
@@ -1031,7 +1031,7 @@ discard block |
||
1031 | 1031 | // look for a media type with a structured syntax suffix (RFC 6839) |
1032 | 1032 | $parts = explode('+', $mediaType); |
1033 | 1033 | if (count($parts) >= 2) { |
1034 | - $mediaType = 'application/' . $parts[count($parts)-1]; |
|
1034 | + $mediaType = 'application/' . $parts[count($parts) - 1]; |
|
1035 | 1035 | } |
1036 | 1036 | |
1037 | 1037 | if (isset($this->bodyParsers[$mediaType]) === true) { |