MAPG-203 remove placesWithoutPano logic from PlaceRepository

This commit is contained in:
Bence Pőcze 2021-03-15 12:25:49 +01:00
parent bf27f15709
commit 2c4d809d49
Signed by: bence
GPG Key ID: AA52B11A3269D1C1

View File

@ -29,17 +29,14 @@ class PlaceRepository
} }
//TODO: use Map instead of id //TODO: use Map instead of id
public function getRandomForMapWithValidPano(int $mapId, array $exclude = [], array &$placesWithoutPano): Place public function getRandomForMapWithValidPano(int $mapId, array $exclude = []): Place
{ {
$placesWithoutPano = [];
do { do {
$place = $this->selectRandomFromDbForMap($mapId, $exclude); $place = $this->selectRandomFromDbForMap($mapId, $exclude);
$panoId = $place->getFreshPanoId(); $panoId = $place->getFreshPanoId();
if ($panoId === null) { if ($panoId === null) {
$placesWithoutPano[] = $exclude[] = $place->getId(); $exclude[] = $place->getId();
} }
} while ($panoId === null); } while ($panoId === null);