Knp\Bundle\KnpBundlesBundle\Consumer\UpdateBundleConsumer::updateContributors PHP Method

updateContributors() private method

Takes a bundle and update its contributors
private updateContributors ( Bundle $bundle )
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle
    private function updateContributors(Bundle $bundle)
    {
        $contributorNames = $this->githubRepoApi->getContributorNames($bundle);
        $contributors = array();
        foreach ($contributorNames as $contributorName) {
            $contributors[] = $this->ownerManager->createOwner($contributorName, 'unknown');
        }
        $bundle->setContributors($contributors);
        if ($this->logger) {
            $this->logger->info(sprintf('%d contributor(s) have been retrieved for bundle %s', count($contributors), $bundle->getName()));
        }
    }