Completed
Pull Request — master (#591)
by Amrouche
03:19
created
src/Swagger/Serializer/CollectionFiltersNormalizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Swagger/Serializer/CollectionNormalizer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Swagger/Serializer/PartialCollectionViewNormalizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
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
             ];
Please login to merge, or discard this patch.
Bridge/Symfony/Validator/Serializer/ConstraintViolationListNormalizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.