From 654cc483b3905618a8a3eb104af92e8506682262 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 18 Dec 2024 11:42:09 +0800 Subject: [PATCH] eee --- SqlBuilder.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/SqlBuilder.php b/SqlBuilder.php index dc4885a..55e64d7 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -189,7 +189,7 @@ class SqlBuilder extends Component if (is_null($value)) { return $keys; } - if ($this->isMath($value)) { + if (preg_match('/^[+|-]\s\d+$/', $value)) { $keys[] = $key . '=' . $key . ' ' . $value; } else { $this->query->pushParam($value); @@ -199,16 +199,6 @@ class SqlBuilder extends Component } - /** - * @param string $value - * @return bool - */ - private function isMath(string $value): bool - { - return (bool)preg_match('/^[+|-]\s\d+$/', $value); - } - - /** * @return string * @throws