@@ -52,7 +52,6 @@ public function setKey($field) {
5252 /**
5353 * @param string $field
5454 * @param bool|int|float|string $value
55- * @throws UnexpectedValueException
5655 * @return $this
5756 */
5857 public function add ($ field , $ value ) {
@@ -63,7 +62,6 @@ public function add($field, $value) {
6362 /**
6463 * @param string $field
6564 * @param bool|int|float|string $value
66- * @throws UnexpectedValueException
6765 * @return $this
6866 */
6967 public function update ($ field , $ value ) {
@@ -74,7 +72,6 @@ public function update($field, $value) {
7472 /**
7573 * @param string $field
7674 * @param bool|int|float|string $value
77- * @throws UnexpectedValueException
7875 * @return $this
7976 */
8077 public function addOrUpdate ($ field , $ value ) {
@@ -85,11 +82,11 @@ public function addOrUpdate($field, $value) {
8582
8683 /**
8784 * @param string $str
88- * @param string ...$_
85+ * @param mixed ...$args
8986 * @return $this
9087 */
91- public function addExpr ($ str , $ _ = null ) {
92- if (count (func_get_args ()) > 1 ) {
88+ public function addExpr ($ str , ... $ args ) {
89+ if (count ($ args ) > 0 ) {
9390 $ this ->fields [] = func_get_args ();
9491 } else {
9592 $ this ->fields [] = $ str ;
@@ -99,29 +96,30 @@ public function addExpr($str, $_ = null) {
9996
10097 /**
10198 * @param string $str
102- * @param string ...$_
99+ * @param mixed ...$args
103100 * @return $this
104101 */
105- public function updateExpr ($ str , $ _ = null ) {
106- if (count (func_get_args ()) > 1 ) {
102+ public function updateExpr ($ str , ... $ args ) {
103+ if (count ($ args ) > 0 ) {
107104 $ this ->update [] = func_get_args ();
108105 } else {
109106 $ this ->update [] = $ str ;
110107 }
111108 return $ this ;
112109 }
113-
110+
114111 /**
115- * @param string $str
112+ * @param string $expr
113+ * @param mixed ...$args
116114 * @return $this
117115 */
118- public function addOrUpdateExpr ($ str ) {
119- if (count (func_get_args ()) > 1 ) {
116+ public function addOrUpdateExpr ($ expr , ... $ args ) {
117+ if (count ($ args ) > 0 ) {
120118 $ this ->fields [] = func_get_args ();
121119 $ this ->update [] = func_get_args ();
122120 } else {
123- $ this ->fields [] = $ str ;
124- $ this ->update [] = $ str ;
121+ $ this ->fields [] = $ expr ;
122+ $ this ->update [] = $ expr ;
125123 }
126124 return $ this ;
127125 }
@@ -176,7 +174,6 @@ public function from(Select $select) {
176174 }
177175
178176 /**
179- * @throws RuntimeException
180177 * @return string
181178 */
182179 public function __toString () {
0 commit comments