Skip to content

Commit

Permalink
Connection::setAutoCommit() will return void
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Mar 18, 2019
1 parent 197063f commit d6a3f2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,11 @@ public function isAutoCommit()
*
* @see isAutoCommit
*
* @param bool $autoCommit True to enable auto-commit mode; false to disable it.
* @throws ConnectionException
* @throws DriverException
*/
public function setAutoCommit($autoCommit)
public function setAutoCommit(bool $autoCommit) : void
{
$autoCommit = (bool) $autoCommit;

// Mode not changed, no-op.
if ($autoCommit === $this->autoCommit) {
return;
Expand Down
2 changes: 0 additions & 2 deletions tests/Doctrine/Tests/DBAL/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ public function testSetAutoCommit()
{
$this->connection->setAutoCommit(false);
self::assertFalse($this->connection->isAutoCommit());
$this->connection->setAutoCommit(0);
self::assertFalse($this->connection->isAutoCommit());
}

/**
Expand Down

0 comments on commit d6a3f2d

Please sign in to comment.