6 declare(strict_types=1);
21 private $inputFactory;
41 private $wrappedTypeProcessor;
57 $this->inputFactory = $inputFactory;
59 $this->typeFactory = $typeFactory;
60 $this->scalarTypes = $scalarTypes;
61 $this->wrappedTypeProcessor = $wrappedTypeProcessor;
73 if ($this->scalarTypes->isScalarType($typeName)) {
74 $instance = $this->wrappedTypeProcessor->processScalarWrappedType($argument);
76 $configElement = $this->config->getConfigElement($typeName);
77 $instance = $this->inputFactory->create($configElement);
78 $instance = $this->wrappedTypeProcessor->processWrappedType($argument, $instance);
81 $calculatedArgument = [
86 if ($this->scalarTypes->isScalarType($typeName) && $argument->
hasDefaultValue()) {
89 $calculatedArgument[
'defaultValue'] = (int)$argument->
getDefaultValue();
92 $calculatedArgument[
'defaultValue'] = (float)$argument->
getDefaultValue();
95 $calculatedArgument[
'defaultValue'] = (bool)$argument->
getDefaultValue();
102 return $calculatedArgument;