ore/app/db/impl/query/UserPagesQueries.scala
Function getProjects
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
): Query0[ProjectListEntry] = {
val visibilityFrag =
if (canSeeHidden) None
else
currentUserId.fold(Some(fr"(p.visibility = 1)")) { id =>
Function getAuthors
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
): Query0[(String, Option[Instant], Instant, Option[Role], Option[Role], Long)] = {
val (sort, reverse) = if (ordering.startsWith("-")) (ordering.substring(1), false) else (ordering, true)
val pageSize = config.ore.users.authorPageSize
val offset = (page - 1) * pageSize
Method getProjects
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
username: String,
currentUserId: Option[DbRef[User]],
canSeeHidden: Boolean,
order: ProjectSortingStrategy,
pageSize: Long,