Skip to content

Commit b328433

Browse files
committed
- Fixed: $callback is of type callable, but the function expects a null|object<Closure>
1 parent b0cce65 commit b328433

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Builder/RunnableSelect.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ public function getIterator() {
222222
}
223223

224224
/**
225-
* @param callable|null $callback
225+
* @param Closure $callback
226226
* @param int $mode
227227
* @param mixed $arg0
228228
* @return mixed
229229
* @throws \Exception
230230
*/
231-
private function fetchAll($callback, $mode, $arg0 = null) {
231+
private function fetchAll(Closure $callback = null, $mode, $arg0 = null) {
232232
return $this->createTempStatement(function (QueryStatement $statement) use ($callback, $mode, $arg0) {
233233
$statement->setFetchMode($mode, $arg0);
234234
$data = $statement->fetchAll();
@@ -256,12 +256,12 @@ private function fetchAll($callback, $mode, $arg0 = null) {
256256
}
257257

258258
/**
259-
* @param callable|null $callback
259+
* @param Closure $callback
260260
* @param int $mode
261261
* @param mixed $arg0
262262
* @return Generator|YieldPolyfillIterator|mixed[]
263263
*/
264-
private function fetchLazy($callback, $mode, $arg0 = null) {
264+
private function fetchLazy(Closure $callback = null, $mode, $arg0 = null) {
265265
if(version_compare(PHP_VERSION, '5.5', '<')) {
266266
return new YieldPolyfillIterator($callback, $this->preserveTypes, function () use ($mode, $arg0) {
267267
$statement = $this->createStatement();
@@ -276,13 +276,13 @@ private function fetchLazy($callback, $mode, $arg0 = null) {
276276
}
277277

278278
/**
279-
* @param callable|null $callback
279+
* @param Closure $callback
280280
* @param int $mode
281281
* @param mixed $arg0
282282
* @return mixed
283283
* @throws \Exception
284284
*/
285-
private function fetch($callback, $mode, $arg0 = null) {
285+
private function fetch(Closure $callback = null, $mode, $arg0 = null) {
286286
return $this->createTempStatement(function (QueryStatement $statement) use ($callback, $mode, $arg0) {
287287
$statement->setFetchMode($mode, $arg0);
288288
$row = $statement->fetch();

0 commit comments

Comments
 (0)