protected function readPackageFolder(string $folder): array
    {
        $packages = [];
        foreach (scandir($folder) as $path) {
            if ($path === '.' || $path === '..') {
                continue;
            }

            $fullPath = $this->pathHelper->join($folder, $path);

            if (!is_dir($fullPath)) {
                continue;
            }

            $composerJson = $this->composerParser->parse(
                $this->pathHelper->realize($this->pathHelper->join($fullPath, 'composer.json'))
            );

            $packages[$fullPath] = $composerJson;
        }

        return $packages;
    }