new Совместимость с php8
This commit is contained in:
parent
2edd65d145
commit
5748ea9148
7 changed files with 17 additions and 30 deletions
|
|
@ -103,7 +103,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
return count($this->cache);
|
||||
}
|
||||
|
||||
function execute($args = null) {
|
||||
function execute($args = null): bool {
|
||||
$result = parent::execute($args);
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,26 +16,26 @@ class StatementIterator implements \Iterator
|
|||
$this->row_count = $rs->getRecordCount();
|
||||
}
|
||||
|
||||
function rewind() {
|
||||
function rewind(): void{
|
||||
$this->pos = 0;
|
||||
}
|
||||
|
||||
function valid() {
|
||||
function valid(): bool {
|
||||
return ($this->pos < $this->row_count);
|
||||
}
|
||||
|
||||
function key() {
|
||||
function key(): mixed {
|
||||
return $this->pos;
|
||||
}
|
||||
|
||||
function current() {
|
||||
function current(): mixed{
|
||||
if (!isset($this->result->cache[$this->pos])) {
|
||||
$this->result->cache[$this->pos] = $this->result->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
return $this->result->cache[$this->pos];
|
||||
}
|
||||
|
||||
function next() {
|
||||
function next(): void{
|
||||
$this->pos++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue