public function to($impl): self
    {
        if (!is_string($impl) && !($impl instanceof \ReflectionClass)) {
            throw new \InvalidArgumentException(
                    '$impl must be a string or an instance of \ReflectionClass'
            );
        }

        $this->impl = $impl;
        return $this;
    }