protected function formatPackagesUnique($pool, array $packages)
    {
        $prepared = array();
        foreach ($packages as $package) {
            if (!is_object($package)) {
                $package = $pool->literalToPackage($package);
            }
            $prepared[$package->getName()]['name'] = $package->getPrettyName();
            $prepared[$package->getName()]['versions'][$package->getVersion()] = $package->getPrettyVersion();
        }
        foreach ($prepared as $name => $package) {
            $prepared[$name] = $package['name'].'['.implode(', ', $package['versions']).']';
        }

        return implode(', ', $prepared);
    }
protected function formatPackagesUnique($pool, array $packages)
    {
        $prepared = array();
        foreach ($packages as $package) {
            if (!is_object($package)) {
                $package = $pool->literalToPackage($package);
            }
            $prepared[$package->getName()]['name'] = $package->getPrettyName();
            $prepared[$package->getName()]['versions'][$package->getVersion()] = $package->getPrettyVersion();
        }
        foreach ($prepared as $name => $package) {
            $prepared[$name] = $package['name'].'['.implode(', ', $package['versions']).']';
        }

        return implode(', ', $prepared);
    }
protected function formatPackagesUnique ( $ pool , array $ packages ) { $ prepared = array ( ) ; foreach ( $ packages as $ package ) { if ( ! is_object ( $ package ) ) { $ package = $ pool -> literalToPackage ( $ package ) ; } $ prepared [ $ package -> getName ( ) ] [ 'name' ] = $ package -> getPrettyName ( ) ; $ prepared [ $ package -> getName ( ) ] [ 'versions' ] [ $ package -> getVersion ( ) ] = $ package -> getPrettyVersion ( ) ; } foreach ( $ prepared as $ name => $ package ) { $ prepared [ $ name ] = $ package [ 'name' ] . '[' . implode ( ', ' , $ package [ 'versions' ] ) . ']' ; } return implode ( ', ' , $ prepared ) ; }
@param Pool  $pool
@param array $packages

@return string
@param Pool $pool @param array $packages