Connection::setAutoCommit() will return void

parent af6909b3
......@@ -503,12 +503,11 @@ class Connection implements DriverConnection
*
* @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;
......
......@@ -251,8 +251,6 @@ class ConnectionTest extends DbalTestCase
{
$this->connection->setAutoCommit(false);
self::assertFalse($this->connection->isAutoCommit());
$this->connection->setAutoCommit(0);
self::assertFalse($this->connection->isAutoCommit());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment