private function parseFile(string $path): array
    {
        $json = json_decode(file_get_contents($path), true);
        $root = dirname($path);

        $namespaces = array_merge(
            iterator_to_array($this->parseNamespaces($json['autoload']['psr-4'] ?: [], $root)),
            iterator_to_array($this->parseNamespaces($json['autoload-dev']['psr-4'] ?: [], $root))
        );
        return $namespaces;
    }