refactor: replace the Model->isset property with a public instance method

This commit is contained in:
Victor Westerlund 2025-11-01 18:28:20 +01:00
parent feea36b190
commit 6ceb58c2c8
Signed by: vlw
GPG key ID: D0AD730E1057DFC6

View file

@ -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)