mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-05-06 08:27:14 +02:00
Make the code PSR-2-compliant.
This commit is contained in:
@@ -60,21 +60,18 @@ class Routing
|
||||
|
||||
if ($matchedBranch !== null) {
|
||||
$commitish = $matchedBranch;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// We may have partial commit hash as our commitish.
|
||||
$hash = $slashPosition === false ? $commitishPath : substr($commitishPath, 0, $slashPosition);
|
||||
if ($repository->hasCommit($hash)) {
|
||||
$commit = $repository->getCommit($hash);
|
||||
$commitish = $commit->getHash();
|
||||
}
|
||||
else
|
||||
} else {
|
||||
throw new EmptyRepositoryException('This repository is currently empty. There are no commits.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$commitishLength = strlen($commitish);
|
||||
$path = substr($commitishPath, $commitishLength);
|
||||
if (strpos($path, '/') === 0) {
|
||||
|
||||
Reference in New Issue
Block a user