Skip to content

Commit 1964a78

Browse files
committed
add return types to methods
1 parent 2f89c59 commit 1964a78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/scala/gitbucket/plugin/pages/pages.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ trait PagesControllerBase extends ControllerBase {
114114

115115
def resolveBranch(git: Git, name: String) = Option(git.getRepository.resolve(name))
116116

117-
def shouldRedirect(path: String, path0: String) =
117+
def shouldRedirect(path: String, path0: String): Boolean =
118118
!isRoot(path) && path0 != path && path0.startsWith(path) && !path.endsWith("/")
119119

120-
def getPathIndexObjectId(git: Git, path: String, revCommit: RevCommit) = {
120+
def getPathIndexObjectId(git: Git, path: String, revCommit: RevCommit): Option[(String, ObjectId)] = {
121121
getPathObjectId0(git, path, revCommit)
122122
.orElse(getPathObjectId0(git, appendPath(path, "index.html"), revCommit))
123123
.orElse(getPathObjectId0(git, appendPath(path, "index.htm"), revCommit))
124124
}
125125

126-
def getPathObjectId0(git: Git, path: String, revCommit: RevCommit) = {
126+
def getPathObjectId0(git: Git, path: String, revCommit: RevCommit): Option[(String, ObjectId)] = {
127127
getPathObjectId(git, path, revCommit).map(path -> _)
128128
}
129129

@@ -133,7 +133,7 @@ trait PagesControllerBase extends ControllerBase {
133133
else base + "/" + suffix
134134
}
135135

136-
def isRoot(path: String) = path == ""
136+
def isRoot(path: String): Boolean = path == ""
137137

138138
private def pagesOption: Constraint = new Constraint() {
139139
override def validate(name: String, value: String, messages: Messages): Option[String] =

0 commit comments

Comments
 (0)