Completed
Pull Request — master (#60)
by
unknown
01:35
created
src/Normalizer/ObjectNormalizer.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      *
121 121
      * @param array  $data
122 122
      * @param string $class
123
-     * @param null   $format
123
+     * @param string|null   $format
124 124
      * @param array  $context
125 125
      *
126 126
      * @return object|null
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      *
174 174
      * @param mixed  $value
175 175
      * @param string $class
176
-     * @param null   $format
176
+     * @param string|null   $format
177 177
      * @param array  $context
178 178
      *
179 179
      * @return object|null
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -124,20 +124,20 @@
 block discarded – undo
124 124
      */
125 125
     private function denormalizeObject(array $data, string $class, $format = null, array $context = [])
126 126
     {
127
-    	// Try to denormalize in other normalizers. Necessary to avoid cycle
128
-	    $context[self::WONT_DENORMALIZE] = true;
129
-	    if (\is_object($denormalizedValue = $this->serializer->denormalize($data, $class, $format, $context))) {
130
-	    	return $denormalizedValue;
131
-	    }
127
+        // Try to denormalize in other normalizers. Necessary to avoid cycle
128
+        $context[self::WONT_DENORMALIZE] = true;
129
+        if (\is_object($denormalizedValue = $this->serializer->denormalize($data, $class, $format, $context))) {
130
+            return $denormalizedValue;
131
+        }
132 132
 
133
-	    // Denormalize in current default normalizer
134
-	    unset($context[self::WONT_DENORMALIZE]);
133
+        // Denormalize in current default normalizer
134
+        unset($context[self::WONT_DENORMALIZE]);
135 135
 
136
-	    foreach ($data as $key => $value) {
137
-		    $data[$key] = $this->denormalizeValue($value, $class, $format, $context);
138
-	    }
136
+        foreach ($data as $key => $value) {
137
+            $data[$key] = $this->denormalizeValue($value, $class, $format, $context);
138
+        }
139 139
 
140
-	    return $this->objectNormalizer->denormalize($data, $class, $format, $context);
140
+        return $this->objectNormalizer->denormalize($data, $class, $format, $context);
141 141
     }
142 142
 
143 143
     /**
Please login to merge, or discard this patch.