private function getNamespace($composerJson)
    {
        if (!file_exists($composerJson)) {
            throw new InvalidArgumentException('"' . $composerJson . '" not found.'); // @codeCoverageIgnore
        }
        $composer = json_decode(file_get_contents($composerJson), true);
        $autoload = isset($composer['autoload']['psr-4']) ? array_flip($composer['autoload']['psr-4']) : [];
        if (!isset($autoload['src/'])) {
            throw new InvalidArgumentException('psr-4 autoload directive for folder "src/" is missing in ' . $composerJson . '.');
        }

        return $autoload['src/'];
    }