@@ -222,13 +222,13 @@ public function getIterator() {
222
222
}
223
223
224
224
/**
225
- * @param callable|null $callback
225
+ * @param Closure $callback
226
226
* @param int $mode
227
227
* @param mixed $arg0
228
228
* @return mixed
229
229
* @throws \Exception
230
230
*/
231
- private function fetchAll ($ callback , $ mode , $ arg0 = null ) {
231
+ private function fetchAll (Closure $ callback = null , $ mode , $ arg0 = null ) {
232
232
return $ this ->createTempStatement (function (QueryStatement $ statement ) use ($ callback , $ mode , $ arg0 ) {
233
233
$ statement ->setFetchMode ($ mode , $ arg0 );
234
234
$ data = $ statement ->fetchAll ();
@@ -256,12 +256,12 @@ private function fetchAll($callback, $mode, $arg0 = null) {
256
256
}
257
257
258
258
/**
259
- * @param callable|null $callback
259
+ * @param Closure $callback
260
260
* @param int $mode
261
261
* @param mixed $arg0
262
262
* @return Generator|YieldPolyfillIterator|mixed[]
263
263
*/
264
- private function fetchLazy ($ callback , $ mode , $ arg0 = null ) {
264
+ private function fetchLazy (Closure $ callback = null , $ mode , $ arg0 = null ) {
265
265
if (version_compare (PHP_VERSION , '5.5 ' , '< ' )) {
266
266
return new YieldPolyfillIterator ($ callback , $ this ->preserveTypes , function () use ($ mode , $ arg0 ) {
267
267
$ statement = $ this ->createStatement ();
@@ -276,13 +276,13 @@ private function fetchLazy($callback, $mode, $arg0 = null) {
276
276
}
277
277
278
278
/**
279
- * @param callable|null $callback
279
+ * @param Closure $callback
280
280
* @param int $mode
281
281
* @param mixed $arg0
282
282
* @return mixed
283
283
* @throws \Exception
284
284
*/
285
- private function fetch ($ callback , $ mode , $ arg0 = null ) {
285
+ private function fetch (Closure $ callback = null , $ mode , $ arg0 = null ) {
286
286
return $ this ->createTempStatement (function (QueryStatement $ statement ) use ($ callback , $ mode , $ arg0 ) {
287
287
$ statement ->setFetchMode ($ mode , $ arg0 );
288
288
$ row = $ statement ->fetch ();
0 commit comments