src/Builder/WebBuilder.php
private function getMappedPackageList(array $packages): array
    {
        $groupedPackages = $this->groupPackagesByName($packages);

        $mappedPackages = [];
        foreach ($groupedPackages as $name => $packages) {
            $highest = $this->getHighestVersion($packages);

            $mappedPackages[$name] = [
                'highest' => $highest,
                'abandoned' => $highest instanceof CompletePackageInterface ? $highest->isAbandoned() : false,
                'replacement' => $highest instanceof CompletePackageInterface ? $highest->getReplacementPackage() : null,
                'versions' => $this->getDescSortedVersions($packages),
            ];
        }

        return $mappedPackages;
    }
private function getMappedPackageList(array $packages): array
    {
        $groupedPackages = $this->groupPackagesByName($packages);

        $mappedPackages = [];
        foreach ($groupedPackages as $name => $packages) {
            $highest = $this->getHighestVersion($packages);

            $mappedPackages[$name] = [
                'highest' => $highest,
                'abandoned' => $highest instanceof CompletePackageInterface ? $highest->isAbandoned() : false,
                'replacement' => $highest instanceof CompletePackageInterface ? $highest->getReplacementPackage() : null,
                'versions' => $this->getDescSortedVersions($packages),
            ];
        }

        return $mappedPackages;
    }
private function getMappedPackageList ( array $ packages ) : array { $ groupedPackages = $ this -> groupPackagesByName ( $ packages ) ; $ mappedPackages = [ ] ; foreach ( $ groupedPackages as $ name => $ packages ) { $ highest = $ this -> getHighestVersion ( $ packages ) ; $ mappedPackages [ $ name ] = [ 'highest' => $ highest , 'abandoned' => $ highest instanceof CompletePackageInterface ? $ highest -> isAbandoned ( ) : false , 'replacement' => $ highest instanceof CompletePackageInterface ? $ highest -> getReplacementPackage ( ) : null , 'versions' => $ this -> getDescSortedVersions ( $ packages ) , ] ; } return $ mappedPackages ; }
Gets a list of packages grouped by name with a list of versions.

@param PackageInterface[] $packages List of packages to dump

@return array Grouped list of packages with versions
Gets a list of packages grouped by name with a list of versions .