1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Set nullable type for Backup

This commit is contained in:
David Bomba 2021-09-26 20:46:49 +10:00
parent c581c183ac
commit 7604bf28e6

View File

@ -27,8 +27,11 @@ class InvoiceHistoryTransformer extends EntityTransformer
'activity', 'activity',
]; ];
public function transform(Backup $backup) public function transform(?Backup $backup)
{ {
if(!$backup)
return [];
return [ return [
'id' => $this->encodePrimaryKey($backup->id), 'id' => $this->encodePrimaryKey($backup->id),
'activity_id' => $this->encodePrimaryKey($backup->activity_id), 'activity_id' => $this->encodePrimaryKey($backup->activity_id),