From fefb54dbfa47b5382f3c1547767afee64874c191 Mon Sep 17 00:00:00 2001 From: Aleksandr Golouz Date: Fri, 23 Oct 2026 12:58:00 +0500 Subject: [PATCH] Applied nullable_type_declaration_for_default_null_value rule for php-cs-fixer --- src/Sql/AbstractInsertStatement.php | 2 +- src/Sql/AbstractStatement.php | 2 +- src/StatementExecutor.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sql/AbstractInsertStatement.php b/src/Sql/AbstractInsertStatement.php index 7d334ff..966e29b 100644 --- a/src/Sql/AbstractInsertStatement.php +++ b/src/Sql/AbstractInsertStatement.php @@ -23,7 +23,7 @@ abstract class AbstractInsertStatement extends AbstractStatement implements Comm * @param string|null $sequence Name of the sequence object from which the ID should be returned. * @return mixed Returns the ID of the last inserted row or sequence value. */ - public function exec(string $sequence = null): mixed + public function exec(?string $sequence = null): mixed { return $this->db()->insert($this->toSql(), $this->getParams(), $sequence); } diff --git a/src/Sql/AbstractStatement.php b/src/Sql/AbstractStatement.php index a1c1aae..15d24c1 100644 --- a/src/Sql/AbstractStatement.php +++ b/src/Sql/AbstractStatement.php @@ -19,7 +19,7 @@ abstract class AbstractStatement implements Statement */ protected bool $built = false; - final public function __construct(StatementExecutor $db = null) + final public function __construct(?StatementExecutor $db = null) { $this->db = $db; } diff --git a/src/StatementExecutor.php b/src/StatementExecutor.php index 4b1f0d4..874553a 100644 --- a/src/StatementExecutor.php +++ b/src/StatementExecutor.php @@ -23,7 +23,7 @@ public function execute(string $sql, array $params): int; * * @return mixed Returns the ID of the last inserted row or sequence value. */ - public function insert(string $sql, array $params, string $sequence = null): mixed; + public function insert(string $sql, array $params, ?string $sequence = null): mixed; /** * Executes the SQL statement and returns all rows.