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