protected function addClassToMap($type, $className)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Type (class key) must be a string'
            );
        }

        $this->map[$type] = $className;
        return $this;
    }