chore: cleanup, add PHPStan type annotations

This commit is contained in:
Björn Fromme
2026-04-03 13:45:41 +02:00
parent a264526127
commit fce6d1615a
14 changed files with 91 additions and 41 deletions
+7 -18
View File
@@ -76,17 +76,6 @@ class TravelSnapshotService
return null;
}
if (false === $travel instanceof Travel) {
$this->logger->warning('Snapshot payload deserialization returned unexpected type', [
'dateId' => $dateId,
'hotelId' => $hotelId,
'snapshotId' => $snapshot->getId(),
'type' => get_debug_type($travel),
]);
return null;
}
return $travel;
}
@@ -173,11 +162,15 @@ class TravelSnapshotService
/**
* Refreshes snapshot payloads with extended availability data.
*
* @param array<int>|null $xmlAvailableDateIds
* @return array{processed:int,updated:int,failed:int}
*/
public function refreshExtendedSnapshots(int $limit = 500, bool $force = false, int $refreshAfterMinutes = 360, ?array $xmlAvailableDateIds = null): array
{
public function refreshExtendedSnapshots(
int $limit = 500,
bool $force = false,
int $refreshAfterMinutes = 360,
?array $xmlAvailableDateIds = null
): array {
$dateToThreshold = new \DateTimeImmutable('today');
$refreshBefore = new \DateTimeImmutable(sprintf('-%d minutes', $refreshAfterMinutes));
@@ -313,10 +306,6 @@ class TravelSnapshotService
return null;
}
if (false === $travel instanceof Travel) {
return null;
}
return $travel;
}