Skip to content

Commit

Permalink
#2648 Renamed set() to register()
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Mar 30, 2018
1 parent 079d037 commit f98a9f3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/LastInsertId.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function get() : string
return $this->value;
}

public function set(string $value) : void
public function register(string $value) : void
{
// The last insert ID is reset to "0" in certain situations by some implementations,
// therefore we keep the previously set insert ID locally.
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function exec($statement)
throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno);
}

$this->lastInsertId->set((string) $this->_conn->insert_id);
$this->lastInsertId->register((string) $this->_conn->insert_id);

return $this->_conn->affected_rows;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function execute($params = null)
throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno);
}

$this->lastInsertId->set((string) $this->_conn->insert_id);
$this->lastInsertId->register((string) $this->_conn->insert_id);

if (null === $this->_columnNames) {
$meta = $this->_stmt->result_metadata();
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/PDOConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function trackLastInsertId() : void
return;
}

$this->lastInsertId->set($lastInsertId);
$this->lastInsertId->register($lastInsertId);
}

/**
Expand Down

0 comments on commit f98a9f3

Please sign in to comment.