src/Plugin.php
protected function getLocalRepositoryPackages($excludeRootPackage = false)
    {
        $repositoryManager = $this->composer->getRepositoryManager();
        $localRepository = $repositoryManager->getLocalRepository();
        $packages = $localRepository->getPackages();
        if ($excludeRootPackage) {
            $result = array();
            foreach ($packages as $package) {
                if (!$package instanceof RootPackageInterface) {
                    $result[] = $package;
                }
            }
        } else {
            $result = $packages;
        }

        return $result;
    }
protected function getLocalRepositoryPackages($excludeRootPackage = false)
    {
        $repositoryManager = $this->composer->getRepositoryManager();
        $localRepository = $repositoryManager->getLocalRepository();
        $packages = $localRepository->getPackages();
        if ($excludeRootPackage) {
            $result = array();
            foreach ($packages as $package) {
                if (!$package instanceof RootPackageInterface) {
                    $result[] = $package;
                }
            }
        } else {
            $result = $packages;
        }

        return $result;
    }
protected function getLocalRepositoryPackages ( $ excludeRootPackage = false ) { $ repositoryManager = $ this -> composer -> getRepositoryManager ( ) ; $ localRepository = $ repositoryManager -> getLocalRepository ( ) ; $ packages = $ localRepository -> getPackages ( ) ; if ( $ excludeRootPackage ) { $ result = array ( ) ; foreach ( $ packages as $ package ) { if ( ! $ package instanceof RootPackageInterface ) { $ result [ ] = $ package ; } } } else { $ result = $ packages ; } return $ result ; }
Get the packages from the local Composer repository.

@param mixed $excludeRootPackage

@return \Composer\Package\PackageInterface[]
Get the packages from the local Composer repository .