Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\CallsDenormalizerInterface::denormalize PHP Method

denormalize() public method

Denormalizes a method call.
public denormalize ( Nelmio\Alice\FixtureInterface $scope, Nelmio\Alice\FixtureBuilder\Denormalizer\FlagParserInterface $parser, string $unparsedMethod, array $unparsedArguments ) : Nelmio\Alice\Definition\MethodCallInterface
$scope Nelmio\Alice\FixtureInterface See SpecificationsDenormalizerInterface
$parser Nelmio\Alice\FixtureBuilder\Denormalizer\FlagParserInterface
$unparsedMethod string
$unparsedArguments array
return Nelmio\Alice\Definition\MethodCallInterface
    public function denormalize(FixtureInterface $scope, FlagParserInterface $parser, string $unparsedMethod, array $unparsedArguments) : MethodCallInterface;

Usage Example

 private function denormalizeCallMethod(CallsDenormalizerInterface $callsDenormalizer, $methodCall, FixtureInterface $scope, FlagParserInterface $parser) : MethodCallInterface
 {
     if (false === is_array($methodCall)) {
         throw TypeErrorFactory::createForInvalidSpecificationBagMethodCall($methodCall);
     }
     $unparsedMethod = key($methodCall);
     if (false === is_string($unparsedMethod)) {
         throw TypeErrorFactory::createForInvalidSpecificationBagMethodCallName($unparsedMethod);
     }
     return $callsDenormalizer->denormalize($scope, $parser, $unparsedMethod, $methodCall[$unparsedMethod]);
 }
CallsDenormalizerInterface