public function __construct(DependencyGraph $dependencyGraph = null) { $this->dependencyGraph = $dependencyGraph ?: new DependencyGraph(); }