@@ -69,7 +69,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $reflectionProperty = $classMetadata->getReflectionClass()->getProperty($associationName); |
| 155 | 155 | $reflectionProperty->setAccessible(true); |
| 156 | 156 | $collection = $reflectionProperty->getValue($object); |
| 157 | - if (!$collection instanceof PersistentCollection) { |
|
| 157 | + if ( ! $collection instanceof PersistentCollection) { |
|
| 158 | 158 | continue; |
| 159 | 159 | } |
| 160 | 160 | |
@@ -106,13 +106,13 @@ |
||
| 106 | 106 | |
| 107 | 107 | if ($collection = $context->removePersistentCollectionForCurrentPath()) { |
| 108 | 108 | foreach ($elements as $element) { |
| 109 | - if (!$collection->contains($element)) { |
|
| 109 | + if ( ! $collection->contains($element)) { |
|
| 110 | 110 | $collection->add($element); |
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | foreach ($collection as $collectionElement) { |
| 115 | - if (!$elements->contains($collectionElement)) { |
|
| 115 | + if ( ! $elements->contains($collectionElement)) { |
|
| 116 | 116 | $collection->removeElement($collectionElement); |
| 117 | 117 | } |
| 118 | 118 | } |