From 00337cd3aac28d7be13abbab98079bccf40b7fac Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Sat, 1 Nov 2025 18:34:48 +0100 Subject: [PATCH] refactor: replace the Model->isset property with a public instance method (#9) This change is primarily to accommodate the new `Reflect::serialize()` method since we don't want to include the isset property when returning serialized objects. Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/9 --- src/Database/Model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Database/Model.php b/src/Database/Model.php index 96d9bb6..0b12e91 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -72,9 +72,8 @@ * * @return bool Entity exists */ - public bool $isset { - // Returns bool if row is set or attempts to resolve and set if null - get => $this->_isset ??= new Database() + public function isset(): bool { + return $this->_isset ??= new Database() ->from($this->table) ->where($this->where) ->limit(1)