Skip to content

Commit 9530eaa

Browse files
committed
优化
1 parent 291afcc commit 9530eaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ShardingQuery.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ public function __construct(array $config)
150150
$this->$key = $value;
151151
break;
152152
case 'limit':
153-
if (!is_int($value)) {
154-
throw new \RuntimeException("'limit' is not a int type.");
153+
if (!is_numeric($value)) {
154+
throw new \RuntimeException("'limit' is not a numeric type.");
155155
}
156156
$this->$key = $value;
157157
break;
158158
case 'offset':
159-
if (!is_int($value)) {
160-
throw new \RuntimeException("'offset' is not a int type.");
159+
if (!is_numeric($value)) {
160+
throw new \RuntimeException("'offset' is not a numeric type.");
161161
}
162162
$this->$key = $value;
163163
break;

0 commit comments

Comments
 (0)