src/Installer.php
private function getSupportedPackages(array $packages)
    {
        $supported_packages = [];
        foreach ($packages as $package) {
            /* @var $package \Composer\Package\PackageInterface */
            if ($this->supportsPackage($package)) {
                $supported_packages[] = $package;
            }
        }
        return $supported_packages;
    }
private function getSupportedPackages(array $packages)
    {
        $supported_packages = [];
        foreach ($packages as $package) {
            /* @var $package \Composer\Package\PackageInterface */
            if ($this->supportsPackage($package)) {
                $supported_packages[] = $package;
            }
        }
        return $supported_packages;
    }
private function getSupportedPackages ( array $ packages ) { $ supported_packages = [ ] ; foreach ( $ packages as $ package ) { /* @var $package \Composer\Package\PackageInterface */ if ( $ this -> supportsPackage ( $ package ) ) { $ supported_packages [ ] = $ package ; } } return $ supported_packages ; }
Gives all packages that we need to install

@param RootPackageInterface[] $packages
@return \Composer\Package\PackageInterface[]
Gives all packages that we need to install