Denormalizes an array of arguments.
public denormalize ( Nelmio\Alice\FixtureInterface $scope, Nelmio\Alice\FixtureBuilder\Denormalizer\FlagParserInterface $parser, array $unparsedArguments ) : array | ||
$scope | Nelmio\Alice\FixtureInterface | |
$parser | Nelmio\Alice\FixtureBuilder\Denormalizer\FlagParserInterface | |
$unparsedArguments | array | |
return | array |
/** * @inheritdoc */ public function denormalize(FixtureInterface $scope, FlagParserInterface $parser, string $unparsedMethod, array $unparsedArguments) : MethodCallInterface { $methodFlags = $parser->parse($unparsedMethod); $method = $methodFlags->getKey(); $arguments = $this->argumentDenormalizer->denormalize($scope, $parser, $unparsedArguments); $methodCall = new SimpleMethodCall($method, $arguments); return $this->handleMethodFlags($methodCall, $methodFlags); }
/** * {@inheritdoc} * * @throws UnexpectedValueException */ public function denormalize(FixtureInterface $scope, FlagParserInterface $parser, array $unparsedConstructor) : MethodCallInterface { /** @var int|string|null $firstKey */ $firstKey = key($unparsedConstructor); if (null === $firstKey || is_int($firstKey) || count($unparsedConstructor) > 1 || is_string($firstKey) && preg_match('/\\(.*\\)/', $firstKey)) { return new SimpleMethodCall('__construct', $this->argumentDenormalizer->denormalize($scope, $parser, $unparsedConstructor)); } throw DenormalizerExceptionFactory::createForUndenormalizableConstructor(); }