fix: Определения типов

This commit is contained in:
origami11@yandex.ru 2025-10-01 12:37:39 +03:00
parent 9f6fd74b17
commit dd74a97894
28 changed files with 334 additions and 249 deletions

View file

@ -16,7 +16,11 @@ class Statement
protected $conn;
protected $query;
function __construct($query, $conn/*: Database*/) {
/**
* @param string $query
* @param Database $conn
*/
function __construct($query, $conn) {
$this->query = $query;
$this->conn = $conn;
}
@ -45,7 +49,7 @@ class Statement
if ($this->limit) {
$this->query .= " LIMIT {$this->limit} OFFSET {$this->offset}";
}
$stmt/*: PDOStatement*/ = $this->conn->prepare($this->query);
$stmt = $this->conn->prepare($this->query);
foreach ($this->binds as $bind) {
list($n, $value, $type) = $bind;
$stmt->bindValue($n, $value, (int) $type);