From d797adeae915abe8c7205aa5028aab922763e344 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Thu, 15 May 2014 19:05:22 +0300 Subject: [PATCH] Make the code PSR-2-compliant. --- src/GitList/Util/Routing.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/GitList/Util/Routing.php b/src/GitList/Util/Routing.php index e32e49a..a8dcc17 100644 --- a/src/GitList/Util/Routing.php +++ b/src/GitList/Util/Routing.php @@ -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) {