public function setDependencies(array $dependencies)
    {
        $this->dependencies = array_values(array_filter($dependencies, function ($dependency): bool {
            return $dependency instanceof Dependency;
        }));
        return $this;
    }