Completed
Push — master ( fb21bc...46b7df )
by Emily
02:00
created
src/Service/PropertyAccessor.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
         if (is_null($value))
48 48
         {
49 49
             $this->setNullValue($property, $type);
50
-        }
51
-        else
50
+        } else
52 51
         {
53 52
             $this->setNonNullValue($property, $value, $type);
54 53
         }
@@ -59,8 +58,7 @@  discard block
 block discarded – undo
59 58
         if ($type->nullable)
60 59
         {
61 60
             $this->setRawValue($property, null);
62
-        }
63
-        else
61
+        } else
64 62
         {
65 63
             $this->throwError($property, 'NonNull', null);
66 64
         }
@@ -110,8 +108,7 @@  discard block
 block discarded – undo
110 108
         if (is_scalar($value))
111 109
         {
112 110
             $this->setRawValue($property, $cast($value));
113
-        }
114
-        elseif (is_object($value) && method_exists([$value, $method]))
111
+        } elseif (is_object($value) && method_exists([$value, $method]))
115 112
         {
116 113
             $this->setScalarValue
117 114
             (
@@ -120,8 +117,7 @@  discard block
 block discarded – undo
120 117
                 $method,
121 118
                 $cast
122 119
             );
123
-        }
124
-        else
120
+        } else
125 121
         {
126 122
             $this->throwError($property, $name, $value);
127 123
         }
@@ -132,8 +128,7 @@  discard block
 block discarded – undo
132 128
         if (is_a($value, $type->classname))
133 129
         {
134 130
             $this->setRawValue($property, $value);
135
-        }
136
-        else
131
+        } else
137 132
         {
138 133
             $this->throwError($property, $type->classname, $value);
139 134
         }
@@ -144,8 +139,7 @@  discard block
 block discarded – undo
144 139
         if (is_a($value, \ArrayAccess::class) || is_array($value))
145 140
         {
146 141
             $this->setRawValue($property, $value);
147
-        }
148
-        else
142
+        } else
149 143
         {
150 144
             $this->throwError($property, 'Collection', $value);
151 145
         }
Please login to merge, or discard this patch.