src/PeekAndPoke/Aviator/ServiceContainer/ServiceContainerCodeGenerator.php
private function generateSetterInjectionsCode(ServiceDefinition $service) : string
    {
        $setterInjectionsCode = '';

        foreach ($service->getInjection()->getSetterInjections() as $setterInjection) {

            $setterInjectionsCode .= <<<PHP

        \$service->{$setterInjection->getMethodName()}(
{$this->buildInjectionParameters($this->container, $setterInjection)}
        );
PHP;

        }

        return $setterInjectionsCode;
    }
private function generateSetterInjectionsCode(ServiceDefinition $service) : string
    {
        $setterInjectionsCode = '';

        foreach ($service->getInjection()->getSetterInjections() as $setterInjection) {

            $setterInjectionsCode .= <<<PHP

        \$service->{$setterInjection->getMethodName()}(
{$this->buildInjectionParameters($this->container, $setterInjection)}
        );
PHP;

        }

        return $setterInjectionsCode;
    }
@param ServiceDefinition $service

@return string