From 3fb915cac44ec1938f197cf170c2d46809d2c655 Mon Sep 17 00:00:00 2001 From: markhuot Date: Wed, 22 Nov 2023 00:56:25 -0500 Subject: [PATCH] phpstan --- src/behaviors/SnapshotableBehavior.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/behaviors/SnapshotableBehavior.php b/src/behaviors/SnapshotableBehavior.php index 3c53761..640f0a8 100644 --- a/src/behaviors/SnapshotableBehavior.php +++ b/src/behaviors/SnapshotableBehavior.php @@ -29,15 +29,15 @@ public function toSnapshot() return $value; }); - return $customFields->set([ + return $customFields->merge([ 'title' => $this->owner->title, 'enabled' => $this->owner->enabled, 'archived' => $this->owner->archived, 'uri' => $this->owner->uri, 'trashed' => $this->owner->trashed, - 'ref' => $this->owner->ref, - 'status' => $this->owner->status, - 'url' => $this->owner->url, + 'ref' => $this->owner->ref ?? null, + 'status' => $this->owner->status ?? null, + 'url' => $this->owner->url ?? null, ])->all(); } }