Completed
Pull Request — master (#7)
by Emily
02:13
created
src/Service/TypeComparator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,12 +46,10 @@
 block discarded – undo
46 46
         )
47 47
         {
48 48
             return true;
49
-        }
50
-        elseif ($parent instanceof ScalarType)
49
+        } elseif ($parent instanceof ScalarType)
51 50
         {
52 51
             return get_class($parent) === get_class($child);
53
-        }
54
-        elseif ($parent instanceof ObjectType)
52
+        } elseif ($parent instanceof ObjectType)
55 53
         {
56 54
             if
57 55
             (
Please login to merge, or discard this patch.
src/Service/PropertyAccessor.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -87,15 +87,13 @@  discard block
 block discarded – undo
87 87
             if ($building)
88 88
             {
89 89
                 $this->buildProperty($property);
90
-            }
91
-            else
90
+            } else
92 91
             {
93 92
                 if (isset($args[$i]))
94 93
                 {
95 94
                     $this->setAnyValue($property, $args[$i]);
96 95
                     $i++;
97
-                }
98
-                else
96
+                } else
99 97
                 {
100 98
                     $building = true;
101 99
                     $this->buildProperty($property);
@@ -119,8 +117,7 @@  discard block
 block discarded – undo
119 117
         if (!$property->type instanceof ObjectType)
120 118
         {
121 119
             $this->setAnyValue($property, 0);
122
-        }
123
-        elseif ($property->builtInConstructor)
120
+        } elseif ($property->builtInConstructor)
124 121
         {
125 122
             $class = (string)$property->type->classname;
126 123
             $this->setRawValue($property->name, new $class());
@@ -175,12 +172,10 @@  discard block
 block discarded – undo
175 172
         if ($comparator->compatible($property->type, $valueType))
176 173
         {
177 174
             $this->setRawValue($property->name, $value);
178
-        }
179
-        elseif ($property->type instanceof ScalarType)
175
+        } elseif ($property->type instanceof ScalarType)
180 176
         {
181 177
             $this->setScalarValue($property, $valueType, $value);
182
-        }
183
-        else
178
+        } else
184 179
         {
185 180
             $this->throwError($property, $valueType);
186 181
         }
@@ -209,8 +204,7 @@  discard block
 block discarded – undo
209 204
                 $property->name,
210 205
                 $property->type->cast($value)
211 206
             );
212
-        }
213
-        elseif (is_object($value) && method_exists([$value, $method]))
207
+        } elseif (is_object($value) && method_exists([$value, $method]))
214 208
         {
215 209
             $this->setScalarValue
216 210
             (
@@ -218,8 +212,7 @@  discard block
 block discarded – undo
218 212
                 $valueType,
219 213
                 $value->$method()
220 214
             );
221
-        }
222
-        else
215
+        } else
223 216
         {
224 217
             $this->throwError($property, $valueType);
225 218
         }
Please login to merge, or discard this patch.