private function addCustomRepositoriesToCollection($reposCollection, $config_user)
{
foreach ($config_user as $config) {
foreach ($config as $repository) {
if (!($source = @$repository->source)) {
throw new \RuntimeException(sprintf("The parameter source on repository is not defined."));
}
if (!($target = @$repository->target)) {
throw new \RuntimeException(sprintf("The parameter target on repository is not defined."));
}
if (!($revision = @$repository->revision)) {
throw new \RuntimeException(sprintf("The parameter revision on repository is not defined."));
}
$reposCollection->add(new Repository($source, $target, $this->typeOfElement($revision), $revision));
}
}
return $reposCollection;
}