chore: cleanup, add PHPStan type annotations
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user