From f305c975132a14986338e51b0f515d2f214f3cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 29 May 2021 00:56:43 +0200 Subject: [PATCH 1/2] MAPG-240 UserInChallengeRepository::isUserParticipatingInChallenge should return bool --- src/Repository/UserInChallengeRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/UserInChallengeRepository.php b/src/Repository/UserInChallengeRepository.php index f50c7f8..6e87ce9 100644 --- a/src/Repository/UserInChallengeRepository.php +++ b/src/Repository/UserInChallengeRepository.php @@ -76,6 +76,6 @@ class UserInChallengeRepository $select->where('user_id', '=', $userId); $select->where('challenge_id', '=', $challenge->getId()); - return $select->count(); + return $select->count() != 0; } } -- 2.45.2 From be4a2038e5cd05ef128181468e43b08851666a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 29 May 2021 00:57:59 +0200 Subject: [PATCH 2/2] MAPG-240 add use for PlaceInChallenge (used in MapAdminController::deleteChallenge) --- src/Controller/MapAdminController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controller/MapAdminController.php b/src/Controller/MapAdminController.php index 2a10ce9..aff6a7e 100644 --- a/src/Controller/MapAdminController.php +++ b/src/Controller/MapAdminController.php @@ -8,6 +8,7 @@ use MapGuesser\Interfaces\Response\IContent; use MapGuesser\PersistentData\Model\Challenge; use MapGuesser\PersistentData\Model\Map; use MapGuesser\PersistentData\Model\Place; +use MapGuesser\PersistentData\Model\PlaceInChallenge; use MapGuesser\PersistentData\PersistentDataManager; use MapGuesser\Repository\ChallengeRepository; use MapGuesser\Repository\GuessRepository; -- 2.45.2