You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -128,7 +128,7 @@ private function buildToArray()
128
128
$this->addMethod('toArray', '
129
129
public function NAME(): array
130
130
{
131
-
'.$toArrayBody.'
131
+
'.$body.'
132
132
133
133
return $output;
134
134
}
@@ -137,7 +137,7 @@ public function NAME(): array
137
137
138
138
privatefunctionbuildConstructor()
139
139
{
140
-
$constructorBody = '';
140
+
$body = '';
141
141
foreach ($this->propertiesas$p) {
142
142
$code = '$value["PROPERTY"]';
143
143
if (null !== $p->getType()) {
@@ -148,23 +148,23 @@ private function buildConstructor()
148
148
}
149
149
}
150
150
151
-
$constructorBody .= strtr('
151
+
$body .= strtr('
152
152
if (isset($value["PROPERTY"])) {
153
153
$this->PROPERTY = '.$code.';
154
154
unset($value["PROPERTY"]);
155
155
}
156
156
', ['PROPERTY' => $p->getName()]);
157
157
}
158
158
159
-
$constructorBody .= '
159
+
$body .= '
160
160
if ($value !== []) {
161
161
throw new \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(sprintf(\'The following keys are not supported by "%s": \', __CLASS__) . implode(\', \', array_keys($value)));
162
162
}';
163
163
164
164
$this->addMethod('__construct', '
165
165
public function __construct(array $value = [])
166
166
{
167
-
'.$constructorBody.'
167
+
'.$body.'
168
168
}
169
169
');
170
170
}
@@ -198,10 +198,6 @@ private function camelCase(string $input): string
0 commit comments