fix: return passed value when setting db row value

This commit is contained in:
Victor Westerlund 2025-12-01 13:53:51 +01:00
parent 2f6e24b0a1
commit 509500fff8
Signed by: vlw
GPG key ID: D0AD730E1057DFC6

View file

@ -97,14 +97,16 @@
*
* @param string $key Target column to update
* @param mixed $value New value of target column
* @return bool Update was successful
* @return mixed The value that was sent to $value
*/
public function set(string $key, mixed $value): bool {
public function set(string $key, mixed $value): mixed {
$this->_row[$key] = $value;
return $this->db
$this->db
->from($this->table)
->where($this->where)
->update([$key => $value]);
return $value;
}
}