| @@ 154-164 (lines=11) @@ | ||
| 151 | * @param NodeInterface[]|mixed[] $arguments |
|
| 152 | * @throws Exception |
|
| 153 | */ |
|
| 154 | protected function validateParsedArguments(array $arguments) |
|
| 155 | { |
|
| 156 | $additionalArguments = []; |
|
| 157 | $argumentDefinitions = $this->prepareArguments(); |
|
| 158 | foreach ($arguments as $argumentName => $value) { |
|
| 159 | if (!array_key_exists($argumentName, $argumentDefinitions)) { |
|
| 160 | $additionalArguments[$argumentName] = $value; |
|
| 161 | } |
|
| 162 | } |
|
| 163 | $this->validateAdditionalArguments($additionalArguments); |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Creates arguments by padding with missing+optional arguments |
|
| @@ 195-205 (lines=11) @@ | ||
| 192 | * @param NodeInterface[] $argumentsObjectTree |
|
| 193 | * @throws Exception |
|
| 194 | */ |
|
| 195 | protected function validateArguments(array $argumentDefinitions, array $argumentsObjectTree) |
|
| 196 | { |
|
| 197 | $additionalArguments = []; |
|
| 198 | foreach ($argumentsObjectTree as $argumentName => $value) { |
|
| 199 | if (!array_key_exists($argumentName, $argumentDefinitions)) { |
|
| 200 | $additionalArguments[$argumentName] = $value; |
|
| 201 | } |
|
| 202 | } |
|
| 203 | $this->abortIfRequiredArgumentsAreMissing($argumentDefinitions, $argumentsObjectTree); |
|
| 204 | $this->uninitializedViewHelper->validateAdditionalArguments($additionalArguments); |
|
| 205 | } |
|
| 206 | ||
| 207 | /** |
|
| 208 | * Throw an exception if required arguments are missing |
|