Completed
Pull Request — master (#1225)
by Dmitriy
11:17
created
src/Construction/DoctrineObjectConstructor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         // Locate possible ObjectManager
54 54
         $objectManager = $this->managerRegistry->getManagerForClass($metadata->name);
55 55
 
56
-        if (!$objectManager) {
56
+        if ( ! $objectManager) {
57 57
             // No ObjectManager found, proceed with normal deserialization
58 58
             return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
59 59
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         // Managed entity, check for proxy load
70
-        if (!\is_array($data) && !(is_object($data) && 'SimpleXMLElement' === get_class($data))) {
70
+        if ( ! \is_array($data) && ! (is_object($data) && 'SimpleXMLElement' === get_class($data))) {
71 71
             // Single identifier, load proxy
72 72
             return $objectManager->getReference($metadata->name, $data);
73 73
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 $dataName = $name;
84 84
             }
85 85
 
86
-            if (!array_key_exists($dataName, $data)) {
86
+            if ( ! array_key_exists($dataName, $data)) {
87 87
                 return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context);
88 88
             }
89 89
             $identifierList[$name] = $data[$dataName];
Please login to merge, or discard this patch.
src/Accessor/DefaultAccessorStrategy.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         if (null === $metadata->getter) {
72
-            if (!isset($this->readAccessors[$metadata->class])) {
73
-                $this->readAccessors[$metadata->class] = function ($o, $name) use ($metadata) {
72
+            if ( ! isset($this->readAccessors[$metadata->class])) {
73
+                $this->readAccessors[$metadata->class] = function($o, $name) use ($metadata) {
74 74
                     $className = $metadata->class;
75 75
                     $property = $this->propertyReflectionCache[$className][$name] ?? null;
76 76
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                         return $property->getValue($o);
84 84
                     }
85 85
 
86
-                    return \Closure::bind(function ($name) use ($property) {
86
+                    return \Closure::bind(function($name) use ($property) {
87 87
                         $isStaticProperty = $property->isStatic();
88 88
 
89 89
                         return $isStaticProperty ? $this::$$name : $this->$name;
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         if (null === $metadata->setter) {
110
-            if (!isset($this->writeAccessors[$metadata->class])) {
110
+            if ( ! isset($this->writeAccessors[$metadata->class])) {
111 111
                 if (true === $metadata->forceReflectionAccess) {
112
-                    $this->writeAccessors[$metadata->class] = function ($o, $name, $value) use ($metadata): void {
112
+                    $this->writeAccessors[$metadata->class] = function($o, $name, $value) use ($metadata): void {
113 113
                         $ref = $this->propertyReflectionCache[$metadata->class][$name] ?? null;
114 114
                         if (null === $ref) {
115 115
                             $ref = new \ReflectionProperty($metadata->class, $name);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                         $ref->setValue($o, $value);
121 121
                     };
122 122
                 } else {
123
-                    $this->writeAccessors[$metadata->class] = \Closure::bind(static function ($o, $name, $value): void {
123
+                    $this->writeAccessors[$metadata->class] = \Closure::bind(static function($o, $name, $value): void {
124 124
                         $o->$name = $value;
125 125
                     }, null, $metadata->class);
126 126
                 }
Please login to merge, or discard this patch.