From 84756b1d41611c7c18df27234d2e7eca6897416e Mon Sep 17 00:00:00 2001 From: Murtaza Sultani Date: Thu, 26 Feb 2026 10:06:19 +0100 Subject: Remove un related changes --- lib/classes/SimpleORMap.php | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/lib/classes/SimpleORMap.php b/lib/classes/SimpleORMap.php index 6e2f044..9861a1d 100644 --- a/lib/classes/SimpleORMap.php +++ b/lib/classes/SimpleORMap.php @@ -2582,45 +2582,6 @@ abstract class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate self::$mariadb_column_default_fix = $state; } - public static function firstOrCreate(array $attributes, array $values = []): static - { - $whereClauses = []; - foreach ($attributes as $key => $value) { - $whereClauses[] = "$key = :$key"; - } - - $record = static::findOneBySQL(implode(' AND ', $whereClauses), $attributes); - if ($record) { - return $record; - } - - return static::create([ - ...$attributes, - ...$values - ]); - } - - public static function updateOrCreate(array $attributes, array $values = []): static - { - $whereClauses = []; - foreach ($attributes as $key => $value) { - $whereClauses[] = "$key = :$key"; - } - - $record = static::findOneBySQL(implode(' AND ', $whereClauses), $attributes); - - if ($record) { - $record->setData($values); - $record->store(); - return $record; - } - - return static::create([ - ...$attributes, - ...$values - ]); - } - // new query builder: private array $wheres = []; -- cgit v1.0