Completed
Pull Request — master (#1289)
by Johannes
13:58
created
src/Construction/DoctrineObjectConstructor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         // Locate possible ObjectManager
66 66
         $objectManager = $this->managerRegistry->getManagerForClass($metadata->name);
67 67
 
68
-        if (!$objectManager) {
68
+        if ( ! $objectManager) {
69 69
             // No ObjectManager found, proceed with normal deserialization
70 70
             return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
71 71
         }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         }
80 80
 
81 81
         // Managed entity, check for proxy load
82
-        if (!\is_array($data) && !(is_object($data) && 'SimpleXMLElement' === get_class($data))) {
82
+        if ( ! \is_array($data) && ! (is_object($data) && 'SimpleXMLElement' === get_class($data))) {
83 83
             // Single identifier, load proxy
84 84
             return $objectManager->getReference($metadata->name, $data);
85 85
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         foreach ($classMetadata->getIdentifierFieldNames() as $name) {
92 92
             // Avoid calling objectManager->find if some identification properties are excluded
93
-            if (!isset($metadata->propertyMetadata[$name])) {
93
+            if ( ! isset($metadata->propertyMetadata[$name])) {
94 94
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
95 95
             }
96 96
 
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
102 102
             }
103 103
 
104
-            if (is_array($data) && !array_key_exists($propertyMetadata->serializedName, $data)) {
104
+            if (is_array($data) && ! array_key_exists($propertyMetadata->serializedName, $data)) {
105 105
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
106
-            } elseif (is_object($data) && !property_exists($data, $propertyMetadata->serializedName)) {
106
+            } elseif (is_object($data) && ! property_exists($data, $propertyMetadata->serializedName)) {
107 107
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
108 108
             }
109 109
 
110 110
             if ('SimpleXMLElement' === get_class($data)) {
111
-                $identifierList[$name] = (string)$data->{$propertyMetadata->serializedName};
111
+                $identifierList[$name] = (string) $data->{$propertyMetadata->serializedName};
112 112
             } else {
113 113
                 $identifierList[$name] = $data[$propertyMetadata->serializedName];
114 114
             }
Please login to merge, or discard this patch.