From 29d21e05e82eed1c8f01083071008b323fffc7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 16 Feb 2023 18:07:10 +0100 Subject: [PATCH] chore: Remove some unused methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Db/BoardMapper.php | 3 --- lib/Service/BoardService.php | 21 +++------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/Db/BoardMapper.php b/lib/Db/BoardMapper.php index 44837a94e..bd24c2e24 100644 --- a/lib/Db/BoardMapper.php +++ b/lib/Db/BoardMapper.php @@ -90,9 +90,6 @@ public function find($id, $withLabels = false, $withAcl = false): Board { $this->boardCache[$id] = $this->findEntity($qb); } - // FIXME is this necessary? it was NOT done with the old mapper - // $this->mapOwner($board); - // Add labels if ($withLabels && $this->boardCache[$id]->getLabels() === null) { $labels = $this->labelMapper->findAll($id); diff --git a/lib/Service/BoardService.php b/lib/Service/BoardService.php index 87f101c09..ba0d212aa 100644 --- a/lib/Service/BoardService.php +++ b/lib/Service/BoardService.php @@ -177,23 +177,12 @@ public function find($boardId, $fullDetails = true) { /** @var Board $board */ $board = $this->boardMapper->find($boardId, true, true); [$board] = array_values($this->enrichBoards([$board], $fullDetails)); - $this->boardsCache[$boardId] = $board; + if ($fullDetails) { + $this->boardsCache[$boardId] = $board; + } return $board; } - /** - * @return array - */ - private function getBoardPrerequisites() { - $groups = $this->groupManager->getUserGroupIds( - $this->userManager->get($this->userId) - ); - return [ - 'user' => $this->userId, - 'groups' => $groups - ]; - } - /** * @param $mapper * @param $id @@ -713,10 +702,6 @@ public function getBoardUrl($endpoint) { return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . '#' . $endpoint; } - private function clearBoardsCache() { - $this->boardsCache = null; - } - /** * Clean a given board data from the Cache */