{
chdir($this->gitDir);
$dirs = glob('*.git', GLOB_ONLYDIR);
- array_walk($dirs, function ($dir) { return substr($dir, 0, -4); });
+ array_walk(
+ $dirs,
+ function ($dir) {
+ return substr($dir, 0, -4);
+ }
+ );
sort($dirs, SORT_NUMERIC);
$n = end($dirs) + 1;
* @param integer $page Page number, beginning with 0
* @param integer $perPage Number of repositories per page
*
- * @return array Array of Repositories
+ * @return array Array of Repositories first, number of repositories second
*/
public function getList($page = 0, $perPage = 10)
{
$r->loadById(substr($oneDir, 0, -4));
$repos[] = $r;
}
- return $repos;
+ return array($repos, count($dirs));
}
}