Completed
Push — master ( 46b7df...4cf19c )
by Emily
02:25
created
src/Service/PropertyAccessor.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
         if (is_null($value))
55 55
         {
56 56
             $this->setNullValue($property->name, $property->type);
57
-        }
58
-        else
57
+        } else
59 58
         {
60 59
             $this->setNonNullValue
61 60
             (
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
         if ($type->nullable)
72 71
         {
73 72
             $this->setRawValue($property, null);
74
-        }
75
-        else
73
+        } else
76 74
         {
77 75
             $this->throwError($property, 'NonNull', null);
78 76
         }
@@ -122,8 +120,7 @@  discard block
 block discarded – undo
122 120
         if (is_scalar($value))
123 121
         {
124 122
             $this->setRawValue($property, $cast($value));
125
-        }
126
-        elseif (is_object($value) && method_exists([$value, $method]))
123
+        } elseif (is_object($value) && method_exists([$value, $method]))
127 124
         {
128 125
             $this->setScalarValue
129 126
             (
@@ -132,8 +129,7 @@  discard block
 block discarded – undo
132 129
                 $method,
133 130
                 $cast
134 131
             );
135
-        }
136
-        else
132
+        } else
137 133
         {
138 134
             $this->throwError($property, $name, $value);
139 135
         }
@@ -144,8 +140,7 @@  discard block
 block discarded – undo
144 140
         if (is_a($value, $type->classname))
145 141
         {
146 142
             $this->setRawValue($property, $value);
147
-        }
148
-        else
143
+        } else
149 144
         {
150 145
             $this->throwError($property, $type->classname, $value);
151 146
         }
@@ -156,8 +151,7 @@  discard block
 block discarded – undo
156 151
         if (is_a($value, \ArrayAccess::class) || is_array($value))
157 152
         {
158 153
             $this->setRawValue($property, $value);
159
-        }
160
-        else
154
+        } else
161 155
         {
162 156
             $this->throwError($property, 'Collection', $value);
163 157
         }
Please login to merge, or discard this patch.
src/Service/ConditionalPropertyAccessor.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
         if ($property->writable)
13 13
         {
14 14
             parent::setAnyValue($property, $value);
15
-        }
16
-        else
15
+        } else
17 16
         {
18 17
             throw new PropertyNotWritableException
19 18
             (
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
                 get_class($this->object),
33 32
                 $property
34 33
             );
35
-        }
36
-        elseif (!$this->reflect->properties[$property]->readable)
34
+        } elseif (!$this->reflect->properties[$property]->readable)
37 35
         {
38 36
             throw new PropertyNotReadableException
39 37
             (
Please login to merge, or discard this patch.