@@ -146,8 +146,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -60,14 +60,12 @@ |
||
| 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 | } |