protected function initializeCommandMethodArguments()
{
$this->arguments->removeAll();
$methodParameters = $this->commandManager->getCommandMethodParameters(get_class($this), $this->commandMethodName);
foreach ($methodParameters as $parameterName => $parameterInfo) {
$dataType = null;
if (isset($parameterInfo['type'])) {
$dataType = $parameterInfo['type'];
} elseif ($parameterInfo['array']) {
$dataType = 'array';
}
if ($dataType === null) {
throw new InvalidArgumentTypeException(sprintf('The argument type for parameter $%s of method %s->%s() could not be detected.', $parameterName, get_class($this), $this->commandMethodName), 1306755296);
}
$defaultValue = isset($parameterInfo['defaultValue']) ? $parameterInfo['defaultValue'] : null;
$this->arguments->addNewArgument($parameterName, $dataType, $parameterInfo['optional'] === false, $defaultValue);
}
}