src/PackageSelection/PackageSelection.php
private function getFilteredLinks(Composer $composer)
    {
        $links = array_values($composer->getPackage()->getRequires());

        // only pick up packages in our filter, if a filter has been set.
        if ($this->hasFilterForPackages()) {
            $packagesFilter = $this->packagesFilter;
            $links = array_filter($links, function (Link $link) use ($packagesFilter) {
                return in_array($link->getTarget(), $packagesFilter);
            });
        }

        return array_values($links);
    }
private function getFilteredLinks(Composer $composer)
    {
        $links = array_values($composer->getPackage()->getRequires());

        // only pick up packages in our filter, if a filter has been set.
        if ($this->hasFilterForPackages()) {
            $packagesFilter = $this->packagesFilter;
            $links = array_filter($links, function (Link $link) use ($packagesFilter) {
                return in_array($link->getTarget(), $packagesFilter);
            });
        }

        return array_values($links);
    }
private function getFilteredLinks ( Composer $ composer ) { $ links = array_values ( $ composer -> getPackage ( ) -> getRequires ( ) ) ; // only pick up packages in our filter, if a filter has been set. if ( $ this -> hasFilterForPackages ( ) ) { $ packagesFilter = $ this -> packagesFilter ; $ links = array_filter ( $ links , function ( Link $ link ) use ( $ packagesFilter ) { return in_array ( $ link -> getTarget ( ) , $ packagesFilter ) ; } ) ; } return array_values ( $ links ) ; }
Gets a list of filtered Links.

@param Composer $composer The Composer instance

@return Link[]
Gets a list of filtered Links .