public function getBasePath()
    {
        if (isset($this->raw->{'base-path'})) {
            if (false === is_dir($this->raw->{'base-path'})) {
                throw new InvalidArgumentException(
                    sprintf(
                        'The base path "%s" is not a directory or does not exist.',
                        $this->raw->{'base-path'}
                    )
                );
            }

            return realpath($this->raw->{'base-path'});
        }

        return realpath(dirname($this->file));
    }