protected function lookupInstalledPackage(Pool $pool, Link $link)
    {
        $packages = $pool->whatProvides($link->getTarget(), $link->getConstraint());

        return (!empty($packages)) ? $packages[0] : null;
    }
protected function lookupInstalledPackage(Pool $pool, Link $link)
    {
        $packages = $pool->whatProvides($link->getTarget(), $link->getConstraint());

        return (!empty($packages)) ? $packages[0] : null;
    }
protected function lookupInstalledPackage ( Pool $ pool , Link $ link ) { $ packages = $ pool -> whatProvides ( $ link -> getTarget ( ) , $ link -> getConstraint ( ) ) ; return ( ! empty ( $ packages ) ) ? $ packages [ 0 ] : null ; }
Resolves a package link to a package in the installed pool

Since dependencies are already installed this should always find one.

@param Pool $pool Pool of installed packages only
@param Link $link Package link to look up

@return PackageInterface|null The found package
Resolves a package link to a package in the installed pool