src/Builder/WebBuilder.php
private function getDescSortedVersions(array $packages): array
    {
        usort($packages, function (PackageInterface $a, PackageInterface $b) {
            return version_compare($b->getVersion(), $a->getVersion());
        });

        return $packages;
    }
private function getDescSortedVersions(array $packages): array
    {
        usort($packages, function (PackageInterface $a, PackageInterface $b) {
            return version_compare($b->getVersion(), $a->getVersion());
        });

        return $packages;
    }
private function getDescSortedVersions ( array $ packages ) : array { usort ( $ packages , function ( PackageInterface $ a , PackageInterface $ b ) { return version_compare ( $ b -> getVersion ( ) , $ a -> getVersion ( ) ) ; } ) ; return $ packages ; }
Sorts by version the list of packages.

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

@return PackageInterface[] Sorted list of packages by version
Sorts by version the list of packages .