MAPG-203 remove placesWithoutPano logic from PlaceRepository
This commit is contained in:
1 file changed
+2
-5
@@ -29,17 +29,14 @@ class PlaceRepository
|
||||
}
|
||||
|
||||
//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 {
|
||||
$place = $this->selectRandomFromDbForMap($mapId, $exclude);
|
||||
|
||||
$panoId = $place->getFreshPanoId();
|
||||
|
||||
if ($panoId === null) {
|
||||
$placesWithoutPano[] = $exclude[] = $place->getId();
|
||||
$exclude[] = $place->getId();
|
||||
}
|
||||
} while ($panoId === null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user