chore: Аннотация типов
This commit is contained in:
parent
f964472e62
commit
cf0bc435ce
19 changed files with 96 additions and 37 deletions
|
|
@ -46,7 +46,9 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function first() {
|
||||
if ($this->cursorPos !== 0) { $this->seek(0); }
|
||||
return $this->next();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ use PDO;
|
|||
|
||||
class StatementIterator implements \Iterator
|
||||
{
|
||||
|
||||
/** @var PDOStatement */
|
||||
private $result;
|
||||
/** @var int */
|
||||
|
|
@ -44,6 +43,9 @@ class StatementIterator implements \Iterator
|
|||
$this->pos++;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
*/
|
||||
function seek($index): void {
|
||||
$this->pos = $index;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue