Completed
Pull Request — master (#748)
by
unknown
19:56 queued 06:27
created
src/JMS/Serializer/Metadata/Driver/XmlDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $discriminatorMap[(string) $entry->attributes()->value] = (string) $entry;
83 83
         }
84 84
 
85
-        $strict_deserialize = 'false' == (string)$elem->attributes()->{'discriminator-strict-deserialize'} ? false : true;
85
+        $strict_deserialize = 'false' == (string) $elem->attributes()->{'discriminator-strict-deserialize'} ? false : true;
86 86
 
87 87
         if ('true' === (string) $elem->attributes()->{'discriminator-disabled'}) {
88 88
             $metadata->discriminatorDisabled = true;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         foreach ($elem->xpath('./virtual-property') as $method) {
122 122
 
123 123
             if (isset($method->attributes()->expression)) {
124
-                $virtualPropertyMetadata = new ExpressionPropertyMetadata($name, (string)$method->attributes()->name, (string)$method->attributes()->expression);
124
+                $virtualPropertyMetadata = new ExpressionPropertyMetadata($name, (string) $method->attributes()->name, (string) $method->attributes()->expression);
125 125
             } else {
126 126
                 if ( ! isset($method->attributes()->method)) {
127 127
                     throw new RuntimeException('The method attribute must be set for all virtual-property elements.');
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
                     }
165 165
 
166 166
                     if (null !== $excludeIf = $pElem->attributes()->{'exclude-if'}) {
167
-                        $pMetadata->excludeIf =$excludeIf;
167
+                        $pMetadata->excludeIf = $excludeIf;
168 168
                     }
169 169
 
170 170
                     if (null !== $excludeIf = $pElem->attributes()->{'expose-if'}) {
171
-                        $pMetadata->excludeIf = "!(" . $excludeIf .")";
171
+                        $pMetadata->excludeIf = "!(".$excludeIf.")";
172 172
                         $isExpose = true;
173 173
                     }
174 174
 
Please login to merge, or discard this patch.
src/JMS/Serializer/GraphNavigator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 /** @var $metadata ClassMetadata */
206 206
                 $metadata = $this->metadataFactory->getMetadataForClass($type['name']);
207 207
 
208
-                if ($metadata->usingExpression && !$this->expressionExclusionStrategy) {
208
+                if ($metadata->usingExpression && ! $this->expressionExclusionStrategy) {
209 209
                     throw new ExpressionLanguageRequiredException("To use conditional exclude/expose in {$metadata->name} you must configure the expression language.");
210 210
                 }
211 211
 
@@ -292,18 +292,18 @@  discard block
 block discarded – undo
292 292
                 break;
293 293
 
294 294
             default:
295
-                if($metadata->discriminatorStrictDeserialize) {
296
-                    throw new \LogicException( sprintf(
295
+                if ($metadata->discriminatorStrictDeserialize) {
296
+                    throw new \LogicException(sprintf(
297 297
                         'The discriminator field name "%s" for base-class "%s" was not found in input data.',
298 298
                         $metadata->discriminatorFieldName,
299 299
                         $metadata->name
300
-                    ) );
300
+                    ));
301 301
                 } else {
302 302
                     $typeValue = null;
303 303
                 }
304 304
         }
305 305
 
306
-        if ( $typeValue && ! isset($metadata->discriminatorMap[$typeValue])) {
306
+        if ($typeValue && ! isset($metadata->discriminatorMap[$typeValue])) {
307 307
             throw new \LogicException(sprintf(
308 308
                 'The type value "%s" does not exist in the discriminator map of class "%s". Available types: %s',
309 309
                 $typeValue,
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             ));
313 313
         }
314 314
 
315
-        if(null == $typeValue && ! $metadata->discriminatorStrictDeserialize) {
315
+        if (null == $typeValue && ! $metadata->discriminatorStrictDeserialize) {
316 316
             return $metadata;
317 317
         }
318 318
 
Please login to merge, or discard this patch.