Skip to content

Commit 5923bad

Browse files
committed
Changed inc() and dec() methods to support float
It's valid to increment a field by a float, this allows both ints and floats to be used in increments and decrements.
1 parent 16d88ae commit 5923bad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MysqliDb.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,18 +1280,18 @@ public function now ($diff = null, $func = "NOW()") {
12801280

12811281
/**
12821282
* Method generates incremental function call
1283-
* @param int increment amount. 1 by default
1283+
* @param int increment by int or float. 1 by default
12841284
*/
12851285
public function inc($num = 1) {
1286-
return Array ("[I]" => "+" . (int)$num);
1286+
return Array ("[I]" => "+" . $num);
12871287
}
12881288

12891289
/**
12901290
* Method generates decrimental function call
1291-
* @param int increment amount. 1 by default
1291+
* @param int increment by int or float. 1 by default
12921292
*/
12931293
public function dec ($num = 1) {
1294-
return Array ("[I]" => "-" . (int)$num);
1294+
return Array ("[I]" => "-" . $num);
12951295
}
12961296

12971297
/**

0 commit comments

Comments
 (0)