public function newToConstructor(
        \ReflectionClass $class,
        string $name,
        InjectionPoints $injectionPoints = null,
        \ReflectionMethod $postConstruct = null
    ) : Dependency {
        $setterMethods = $injectionPoints ? $injectionPoints($class->name) : new SetterMethods([]);
        $newInstance = new NewInstance($class, $setterMethods, new Name($name));

        return new Dependency($newInstance, $postConstruct);
    }
public function newToConstructor(
        \ReflectionClass $class,
        string $name,
        InjectionPoints $injectionPoints = null,
        \ReflectionMethod $postConstruct = null
    ) : Dependency {
        $setterMethods = $injectionPoints ? $injectionPoints($class->name) : new SetterMethods([]);
        $newInstance = new NewInstance($class, $setterMethods, new Name($name));

        return new Dependency($newInstance, $postConstruct);
    }
public function newToConstructor ( \ ReflectionClass $ class , string $ name , InjectionPoints $ injectionPoints = null , \ ReflectionMethod $ postConstruct = null ) : Dependency { $ setterMethods = $ injectionPoints ? $ injectionPoints ( $ class -> name ) : new SetterMethods ( [ ] ) ; $ newInstance = new NewInstance ( $ class , $ setterMethods , new Name ( $ name ) ) ; return new Dependency ( $ newInstance , $ postConstruct ) ; }
Create ToConstructor binding
Create ToConstructor binding