Small coding style fixes, using better variable names

This commit is contained in:
Klaus Silveira
2012-07-14 15:57:08 -03:00
parent 9916c8f5db
commit 2edcf1aebe

View File

@@ -174,13 +174,14 @@ class Utils
$repository = $this->app['git']->getRepository($this->app['git.repos'] . $repo);
$files = $repository->getTree($branch)->output();
foreach ($files as $fileInfo)
if (preg_match('/^readme*/i', $fileInfo['name'])) {
foreach ($files as $file) {
if (preg_match('/^readme*/i', $file['name'])) {
return array(
'filename' => $fileInfo['name'],
'content' => $repository->getBlob("$branch:'".$fileInfo['name']."'")->output()
'filename' => $file['name'],
'content' => $repository->getBlob("$branch:'{$file['name']}'")->output()
);
}
}
return array();
}