Nelmio\Alice\Generator\Instantiator\InstantiatorResolver::resolveFixtureConstructor PHP Method

resolveFixtureConstructor() private method

private resolveFixtureConstructor ( Nelmio\Alice\FixtureInterface $fixture, ResolvedFixtureSet $set, GenerationContext $context ) : array
$fixture Nelmio\Alice\FixtureInterface
$set Nelmio\Alice\Generator\ResolvedFixtureSet
$context Nelmio\Alice\Generator\GenerationContext
return array
    private function resolveFixtureConstructor(FixtureInterface $fixture, ResolvedFixtureSet $set, GenerationContext $context) : array
    {
        $specs = $fixture->getSpecs();
        $constructor = $specs->getConstructor();
        if (null === $constructor || $constructor instanceof NoMethodCall) {
            return [$fixture, $set];
        }
        if (null === $this->valueResolver) {
            throw ResolverNotFoundExceptionFactory::createUnexpectedCall(__METHOD__);
        }
        list($resolvedArguments, $set) = $this->resolveArguments($constructor->getArguments(), $this->valueResolver, $fixture, $set, $context);
        return [$fixture->withSpecs($specs->withConstructor($constructor->withArguments($resolvedArguments))), $set];
    }