MAPG-203 remove placesWithoutPano logic from PlaceRepository
This commit is contained in:
parent
bf27f15709
commit
2c4d809d49
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user