From b1bdf628f20909d84083ec23463cb2754283eaab Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Sat, 1 Nov 2025 16:37:26 +0100 Subject: [PATCH] refactor: replace `for()` with `from()` in database Model (#7) This PR replaces the `vlw\MySQL->for()` with `vlw\MySQL->from()` since for() it's deprecated. Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/7 --- src/Database/Model.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Database/Model.php b/src/Database/Model.php index 3a25932..96d9bb6 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -55,7 +55,7 @@ $this->_resolved = true; $this->_row = $this->db - ->for($this->table) + ->from($this->table) ->where($this->where) ->limit(1) ->select($this->columns) @@ -75,11 +75,11 @@ public bool $isset { // Returns bool if row is set or attempts to resolve and set if null get => $this->_isset ??= new Database() - ->for($this->table) - ->where($this->where) - ->limit(1) - ->select() - ->num_rows === 1; + ->from($this->table) + ->where($this->where) + ->limit(1) + ->select() + ->num_rows === 1; } /** @@ -103,7 +103,7 @@ $this->_row[$key] = $value; return $this->db - ->for($this->table) + ->from($this->table) ->where($this->where) ->update([$key => $value]); }