app/services/impl/LaboratoryServiceImpl.scala
Function get
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get(id: Long): Future[Option[(Laboratory, Map[Room, Seq[(Computer, Option[(ComputerState, Seq[ConnectedUser])])]])]] = {
// Access to database using the laboratory's DAO
laboratoryDAO.getWithChildren(id).map { res =>
// res will have a sequence of (laboratory, room, computer, computerState, connectedUser)
// Then group it by its first element: Laboratory