Passed
Push — master ( 1f88f7...9aeaca )
by Mike
02:51
created
src/Xervice/DataProvider/Generator/DataProviderGenerator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -146,8 +146,7 @@  discard block
 block discarded – undo
146 146
             $default = $element['default'];
147 147
             settype($default, $this->getTypeHint($element['type']));
148 148
             $param->setDefaultValue($default);
149
-        }
150
-        elseif ($element['allownull']) {
149
+        } elseif ($element['allownull']) {
151 150
             $param->setDefaultValue(null);
152 151
         }
153 152
     }
@@ -186,8 +185,7 @@  discard block
 block discarded – undo
186 185
 
187 186
         if ($element['default']) {
188 187
             $property->setValue($element['default']);
189
-        }
190
-        elseif (strpos($element['type'], '[]') !== false) {
188
+        } elseif (strpos($element['type'], '[]') !== false) {
191 189
             $property->setValue([]);
192 190
         }
193 191
     }
Please login to merge, or discard this patch.
src/Xervice/DataProvider/DataProvider/AbstractDataProvider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,14 +60,12 @@
 block discarded – undo
60 60
                 $getMethod = 'get' . $fieldname;
61 61
                 if ($element['is_dataprovider'] && $provider->{$getMethod}() instanceof DataProviderInterface) {
62 62
                     $data[$fieldname] = $this->convertToArray($provider->{$getMethod}());
63
-                }
64
-                elseif ($element['is_collection']) {
63
+                } elseif ($element['is_collection']) {
65 64
                     $data[$fieldname] = [];
66 65
                     foreach ($provider->{$getMethod}() as $child) {
67 66
                         $data[$fieldname][] = $child->toArray();
68 67
                     }
69
-                }
70
-                else {
68
+                } else {
71 69
                     $data[$fieldname] = $provider->{$getMethod}();
72 70
                 }
73 71
             }
Please login to merge, or discard this patch.