@@ -83,7 +83,7 @@ |
||
| 83 | 83 | if (!is_array($requestParts)) { |
| 84 | 84 | return $data; |
| 85 | 85 | } |
| 86 | - if($format === self::FORMAT) { |
|
| 86 | + if ($format === self::FORMAT) { |
|
| 87 | 87 | $currentFilters = []; |
| 88 | 88 | foreach ($this->filters as $filterName => $filter) { |
| 89 | 89 | if (in_array($filterName, $resourceFilters)) { |
@@ -89,8 +89,8 @@ |
||
| 89 | 89 | $datas = []; |
| 90 | 90 | foreach ($object as $obj) { |
| 91 | 91 | $data = $this->serializer->normalize($obj, $format, $context); |
| 92 | - // @todo : This has to be done in the noramlizer |
|
| 93 | - $data['id'] = $data['@id']; |
|
| 92 | + // @todo : This has to be done in the noramlizer |
|
| 93 | + $data['id'] = $data['@id']; |
|
| 94 | 94 | unset($data['@id']); |
| 95 | 95 | unset($data['@type']); |
| 96 | 96 | |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if ([] === $appliedFilters && !$paginated) { |
| 68 | 68 | return $data; |
| 69 | 69 | } |
| 70 | - if ($format === self::FORMAT) { |
|
| 70 | + if ($format === self::FORMAT) { |
|
| 71 | 71 | $data['view'] = [ |
| 72 | 72 | 'page' => $this->getId($parts, $parameters, $paginated ? $currentPage : null), |
| 73 | 73 | ]; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | final class ConstraintViolationListNormalizer implements NormalizerInterface |
| 24 | 24 | { |
| 25 | - const FORMAT = ['swagger-error', 'hydra-error']; |
|
| 25 | + const FORMAT = ['swagger-error', 'hydra-error']; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @var UrlGeneratorInterface |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | ), |
| 61 | 61 | '@type' => 'ConstraintViolationList', |
| 62 | 62 | 'hydra:title' => $context['title'] ?? 'An error occurred', |
| 63 | - 'hydra:description' => $messages ? implode("\n", $messages) : (string)$object, |
|
| 63 | + 'hydra:description' => $messages ? implode("\n", $messages) : (string) $object, |
|
| 64 | 64 | 'violations' => $violations, |
| 65 | 65 | ]; |
| 66 | 66 | |
@@ -71,6 +71,6 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function supportsNormalization($data, $format = null) |
| 73 | 73 | { |
| 74 | - return in_array($format, self::FORMAT) && $data instanceof ConstraintViolationListInterface; |
|
| 74 | + return in_array($format, self::FORMAT) && $data instanceof ConstraintViolationListInterface; |
|
| 75 | 75 | } |
| 76 | 76 | } |