@@ -201,11 +201,11 @@ 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 | return json_decode($input, true); |
| 206 | 206 | }); |
| 207 | 207 | |
| 208 | - $this->registerMediaTypeParser('application/xml', function ($input) { |
|
| 208 | + $this->registerMediaTypeParser('application/xml', function($input) { |
|
| 209 | 209 | $backup = libxml_disable_entity_loader(true); |
| 210 | 210 | $backup_errors = libxml_use_internal_errors(true); |
| 211 | 211 | $result = simplexml_load_string($input); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | return $result; |
| 219 | 219 | }); |
| 220 | 220 | |
| 221 | - $this->registerMediaTypeParser('text/xml', function ($input) { |
|
| 221 | + $this->registerMediaTypeParser('text/xml', function($input) { |
|
| 222 | 222 | $backup = libxml_disable_entity_loader(true); |
| 223 | 223 | $backup_errors = libxml_use_internal_errors(true); |
| 224 | 224 | $result = simplexml_load_string($input); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | return $result; |
| 232 | 232 | }); |
| 233 | 233 | |
| 234 | - $this->registerMediaTypeParser('application/x-www-form-urlencoded', function ($input) { |
|
| 234 | + $this->registerMediaTypeParser('application/x-www-form-urlencoded', function($input) { |
|
| 235 | 235 | parse_str($input, $data); |
| 236 | 236 | return $data; |
| 237 | 237 | }); |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | // look for a media type with a structured syntax suffix (RFC 6839) |
| 1028 | 1028 | $parts = explode('+', $mediaType); |
| 1029 | 1029 | if (count($parts) >= 2) { |
| 1030 | - $mediaType = 'application/' . $parts[count($parts)-1]; |
|
| 1030 | + $mediaType = 'application/' . $parts[count($parts) - 1]; |
|
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | 1033 | if (isset($this->bodyParsers[$mediaType]) === true) { |