rewrote null check

This commit is contained in:
Godfrey M 2024-05-13 11:01:40 -07:00
parent dbeb32f225
commit 35a39efafb

View file

@ -12,8 +12,9 @@ class LicenseSeatsTransformer
public function transformLicenseSeats(Collection $seats, $total, $offset, $page)
{
$array = [];
$offset = isset($offset) ? $offset : 0;
$offset = $offset ?? 0;
$seat_count = 0 +($offset *($page + 1));
foreach ($seats as $seat) {
$seat_count++;
$array[] = self::transformLicenseSeat($seat, $seat_count);