mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
rewrote null check
This commit is contained in:
parent
dbeb32f225
commit
35a39efafb
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue