Passed
Pull Request — master (#1357)
by Rene
02:38
created
src/Construction/DoctrineObjectConstructor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         // Locate possible ObjectManager
70 70
         $objectManager = $this->managerRegistry->getManagerForClass($metadata->name);
71 71
 
72
-        if (!$objectManager) {
72
+        if ( ! $objectManager) {
73 73
             // No ObjectManager found, proceed with normal deserialization
74 74
             return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
75 75
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         // Managed entity, check for proxy load
86
-        if (!is_array($data) && !(is_object($data) && 'SimpleXMLElement' === get_class($data))) {
86
+        if ( ! is_array($data) && ! (is_object($data) && 'SimpleXMLElement' === get_class($data))) {
87 87
             // Single identifier, load proxy
88 88
             return $objectManager->getReference($metadata->name, $data);
89 89
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         foreach ($classMetadata->getIdentifierFieldNames() as $name) {
96 96
             // Avoid calling objectManager->find if some identification properties are excluded
97
-            if (!isset($metadata->propertyMetadata[$name])) {
97
+            if ( ! isset($metadata->propertyMetadata[$name])) {
98 98
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
99 99
             }
100 100
 
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
106 106
             }
107 107
 
108
-            if (is_array($data) && !array_key_exists($propertyMetadata->serializedName, $data)) {
108
+            if (is_array($data) && ! array_key_exists($propertyMetadata->serializedName, $data)) {
109 109
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
110
-            } elseif (is_object($data) && !property_exists($data, $propertyMetadata->serializedName)) {
110
+            } elseif (is_object($data) && ! property_exists($data, $propertyMetadata->serializedName)) {
111 111
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
112 112
             }
113 113
 
Please login to merge, or discard this patch.
src/Handler/ArrayCollectionHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         }
120 120
 
121 121
         $propertyMetadata = $context->getMetadataStack()->top();
122
-        if (!$propertyMetadata instanceof PropertyMetadata) {
122
+        if ( ! $propertyMetadata instanceof PropertyMetadata) {
123 123
             return $elements;
124 124
         }
125 125
 
@@ -137,18 +137,18 @@  discard block
 block discarded – undo
137 137
             && $classMetadata->isCollectionValuedAssociation($propertyMetadata->name)
138 138
         ) {
139 139
             $existingCollection = $classMetadata->getFieldValue($currentObject, $propertyMetadata->name);
140
-            if (!$existingCollection instanceof OrmPersistentCollection) {
140
+            if ( ! $existingCollection instanceof OrmPersistentCollection) {
141 141
                 return $elements;
142 142
             }
143 143
 
144 144
             foreach ($elements as $element) {
145
-                if (!$existingCollection->contains($element)) {
145
+                if ( ! $existingCollection->contains($element)) {
146 146
                     $existingCollection->add($element);
147 147
                 }
148 148
             }
149 149
 
150 150
             foreach ($existingCollection as $collectionElement) {
151
-                if (!$elements->contains($collectionElement)) {
151
+                if ( ! $elements->contains($collectionElement)) {
152 152
                     $existingCollection->removeElement($collectionElement);
153 153
                 }
154 154
             }
Please login to merge, or discard this patch.