Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Sql/AbstractInsertStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/AbstractStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/StatementExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down