chore: Аннотации к типам

This commit is contained in:
origami11@yandex.ru 2025-10-22 17:48:37 +03:00
parent e2ba6bd46e
commit e5713e9015
28 changed files with 305 additions and 110 deletions

View file

@ -4,16 +4,23 @@
* Класс оболочка для PDOStatement для замены Creole
*/
namespace ctiso\Database;
use PDO,
ctiso\Database;
use PDO;
use ctiso\Database;
class Statement
{
/** @var ?int */
protected $limit = null;
/** @var ?int */
protected $offset = null;
/** @var never */
protected $statement = null;
protected $binds = array();
/** @var array{int|string, mixed, int}[] */
protected $binds = [];
/** @var Database */
protected $conn;
/** @var string */
protected $query;
/**
@ -37,14 +44,23 @@ class Statement
$this->binds [] = [$n, $value, PDO::PARAM_LOB];
}
/**
* @param int $limit
*/
function setLimit($limit) {
$this->limit = $limit;
}
/**
* @param int $offset
*/
function setOffset($offset) {
$this->offset = $offset;
}
/**
* @return ?PDOStatement
*/
function executeQuery() {
if ($this->limit) {
$this->query .= " LIMIT {$this->limit} OFFSET {$this->offset}";