@@ -57,9 +57,9 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $path = implode('.', $this->getCurrentPath()); |
| 59 | 59 | if (isset($this->persistentCollections[$path])) { |
| 60 | - $return = $this->persistentCollections[$path]; |
|
| 61 | - unset($this->persistentCollections[$path]); |
|
| 62 | - return $return; |
|
| 60 | + $return = $this->persistentCollections[$path]; |
|
| 61 | + unset($this->persistentCollections[$path]); |
|
| 62 | + return $return; |
|
| 63 | 63 | } |
| 64 | 64 | return null; |
| 65 | 65 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | // Locate possible ObjectManager |
| 69 | 69 | $objectManager = $this->managerRegistry->getManagerForClass($metadata->name); |
| 70 | 70 | |
| 71 | - if (!$objectManager) { |
|
| 71 | + if ( ! $objectManager) { |
|
| 72 | 72 | // No ObjectManager found, proceed with normal deserialization |
| 73 | 73 | return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); |
| 74 | 74 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Managed entity, check for proxy load |
| 85 | - if (!is_array($data) && !(is_object($data) && 'SimpleXMLElement' === get_class($data))) { |
|
| 85 | + if ( ! is_array($data) && ! (is_object($data) && 'SimpleXMLElement' === get_class($data))) { |
|
| 86 | 86 | // Single identifier, load proxy |
| 87 | 87 | return $objectManager->getReference($metadata->name, $data); |
| 88 | 88 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | foreach ($classMetadata->getIdentifierFieldNames() as $name) { |
| 95 | 95 | // Avoid calling objectManager->find if some identification properties are excluded |
| 96 | - if (!isset($metadata->propertyMetadata[$name])) { |
|
| 96 | + if ( ! isset($metadata->propertyMetadata[$name])) { |
|
| 97 | 97 | return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - if (is_array($data) && !array_key_exists($propertyMetadata->serializedName, $data)) { |
|
| 107 | + if (is_array($data) && ! array_key_exists($propertyMetadata->serializedName, $data)) { |
|
| 108 | 108 | return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); |
| 109 | - } elseif (is_object($data) && !property_exists($data, $propertyMetadata->serializedName)) { |
|
| 109 | + } elseif (is_object($data) && ! property_exists($data, $propertyMetadata->serializedName)) { |
|
| 110 | 110 | return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $reflectionProperty = $classMetadata->getReflectionClass()->getProperty($associationName); |
| 153 | 153 | $reflectionProperty->setAccessible(true); |
| 154 | 154 | $collection = $reflectionProperty->getValue($object); |
| 155 | - if (!$collection instanceof PersistentCollection) { |
|
| 155 | + if ( ! $collection instanceof PersistentCollection) { |
|
| 156 | 156 | continue; |
| 157 | 157 | } |
| 158 | 158 | $associationPath = $path; |
@@ -102,9 +102,9 @@ |
||
| 102 | 102 | |
| 103 | 103 | if ($collection = $context->removePersistentCollectionForCurrentPath()) { |
| 104 | 104 | foreach ($elements as $element) { |
| 105 | - if (!$collection->contains($element)) { |
|
| 106 | - $collection->add($element); |
|
| 107 | - } |
|
| 105 | + if (!$collection->contains($element)) { |
|
| 106 | + $collection->add($element); |
|
| 107 | + } |
|
| 108 | 108 | } |
| 109 | 109 | foreach ($collection as $collectionElement) { |
| 110 | 110 | if (!$elements->contains($collectionElement)) { |
@@ -102,12 +102,12 @@ |
||
| 102 | 102 | |
| 103 | 103 | if ($collection = $context->removePersistentCollectionForCurrentPath()) { |
| 104 | 104 | foreach ($elements as $element) { |
| 105 | - if (!$collection->contains($element)) { |
|
| 105 | + if ( ! $collection->contains($element)) { |
|
| 106 | 106 | $collection->add($element); |
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | foreach ($collection as $collectionElement) { |
| 110 | - if (!$elements->contains($collectionElement)) { |
|
| 110 | + if ( ! $elements->contains($collectionElement)) { |
|
| 111 | 111 | $collection->removeElement($collectionElement); |
| 112 | 112 | } |
| 113 | 113 | } |