Skip to content

Commit f50805f

Browse files
committed
- Unused method/property in YieldPolyfillIterator::__construct
1 parent 84ca8a9 commit f50805f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/Builder/Helpers/YieldPolyfillIterator.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
use PDO;
99

1010
class YieldPolyfillIterator implements Iterator {
11-
/** @var RunnableSelect */
12-
private $select;
1311
/** @var Closure|null */
1412
private $callback;
1513
/** @var bool */
@@ -24,13 +22,11 @@ class YieldPolyfillIterator implements Iterator {
2422
private $idx = -1;
2523

2624
/**
27-
* @param RunnableSelect $select
2825
* @param Closure|null $callback
2926
* @param bool $preserveTypes
3027
* @param callable $statementFactory
3128
*/
32-
public function __construct(RunnableSelect $select, Closure $callback = null, $preserveTypes, $statementFactory) {
33-
$this->select = $select;
29+
public function __construct(Closure $callback = null, $preserveTypes, $statementFactory) {
3430
$this->callback = $callback;
3531
$this->preserveTypes = $preserveTypes;
3632
$this->statementFactory = $statementFactory;
@@ -61,9 +57,8 @@ public function current() {
6157
} else {
6258
return $row;
6359
}
64-
} else {
65-
return $row;
6660
}
61+
return $row;
6762
}
6863

6964
/**

src/Builder/RunnableSelect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function fetchRows(Closure $callback = null) {
9292
*/
9393
public function fetchRowsLazy(Closure $callback = null) {
9494
if(version_compare(PHP_VERSION, '5.5', '<')) {
95-
return new YieldPolyfillIterator($this, $callback, $this->preserveTypes, function () {
95+
return new YieldPolyfillIterator($callback, $this->preserveTypes, function () {
9696
return $this->createStatement();
9797
});
9898
}

0 commit comments

Comments
 (0)