/**
* Searches for valid repositories on the specified path
*
* @param array $paths Array of paths where repositories will be searched
* @return array Found repositories, containing their name, path and description
*/
public function getRepositories($paths)
{
$allRepositories = array();
foreach ($paths as $path) {
$repositories = $this->recurseDirectory($path);
if (empty($repositories)) {
throw new \RuntimeException('There are no GIT repositories in ' . $path);
}
$allRepositories = array_merge($allRepositories, $repositories);