@@ -73,17 +73,17 @@ |
||
| 73 | 73 | $isOptional = $configuration->isOptional(); |
| 74 | 74 | $isJsonApi = $this->isContentTypeValid($request); |
| 75 | 75 | |
| 76 | - if (! $isOptional && ! $isJsonApi) { |
|
| 76 | + if (!$isOptional && !$isJsonApi) { |
|
| 77 | 77 | throw new InvalidMediaTypeException($request); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $content = $request->getContent(); |
| 81 | 81 | |
| 82 | - if (! empty($content)) { |
|
| 82 | + if (!empty($content)) { |
|
| 83 | 83 | return $content; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if (! $isOptional) { |
|
| 86 | + if (!$isOptional) { |
|
| 87 | 87 | throw new BadRequestHttpException('Request body is empty'); |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | |
| 102 | 102 | try { |
| 103 | 103 | $document = $this->hydrator->hydrate($decoded); |
| 104 | - } |
|
| 105 | - catch (InvalidDocumentException $exception) { |
|
| 104 | + } catch (InvalidDocumentException $exception) { |
|
| 106 | 105 | throw new BadRequestHttpException('Document hydration error: ' . $exception->getMessage(), $exception); |
| 107 | 106 | } |
| 108 | 107 | |