Commit f0132066 authored by romanb's avatar romanb

[2.0] Formatting issues.

parent 05173a86
...@@ -703,81 +703,80 @@ class Connection ...@@ -703,81 +703,80 @@ class Connection
if ($this->_transactionNestingLevel == 1) { if ($this->_transactionNestingLevel == 1) {
$this->_conn->commit(); $this->_conn->commit();
} }
--$this->_transactionNestingLevel; --$this->_transactionNestingLevel;
return true; return true;
} }
/** /**
* Cancel any database changes done during a transaction or since a specific * Cancel any database changes done during a transaction or since a specific
* savepoint that is in progress. This function may only be called when * savepoint that is in progress. This function may only be called when
* auto-committing is disabled, otherwise it will fail. Therefore, a new * auto-committing is disabled, otherwise it will fail. Therefore, a new
* transaction is implicitly started after canceling the pending changes. * transaction is implicitly started after canceling the pending changes.
* *
* this method can be listened with onPreTransactionRollback and onTransactionRollback * this method can be listened with onPreTransactionRollback and onTransactionRollback
* eventlistener methods * eventlistener methods
* *
* @param string $savepoint Name of a savepoint to rollback to. * @param string $savepoint Name of a savepoint to rollback to.
* @throws Doctrine\DBAL\ConnectionException If the rollback operation fails at database level. * @throws Doctrine\DBAL\ConnectionException If the rollback operation fails at database level.
* @return boolean FALSE if rollback couldn't be performed, TRUE otherwise. * @return boolean FALSE if rollback couldn't be performed, TRUE otherwise.
*/ */
public function rollback() public function rollback()
{ {
if ($this->_transactionNestingLevel == 0) { if ($this->_transactionNestingLevel == 0) {
throw ConnectionException::rollbackFailedNoActiveTransaction(); throw ConnectionException::rollbackFailedNoActiveTransaction();
} }
$this->connect(); $this->connect();
if ($this->_transactionNestingLevel == 1) { if ($this->_transactionNestingLevel == 1) {
$this->_transactionNestingLevel = 0; $this->_transactionNestingLevel = 0;
$this->_conn->rollback(); $this->_conn->rollback();
}
} --$this->_transactionNestingLevel;
--$this->_transactionNestingLevel;
return true; return true;
} }
/** /**
* Quotes pattern (% and _) characters in a string) * Quotes pattern (% and _) characters in a string)
* *
* EXPERIMENTAL * EXPERIMENTAL
* *
* WARNING: this function is experimental and may change signature at * WARNING: this function is experimental and may change signature at
* any time until labelled as non-experimental * any time until labelled as non-experimental
* *
* @param string the input string to quote * @param string the input string to quote
* *
* @return string quoted string * @return string quoted string
*/ */
protected function _escapePattern($text) protected function _escapePattern($text)
{ {
return $text; return $text;
} }
/** /**
* Gets the wrapped driver connection. * Gets the wrapped driver connection.
* *
* @return Doctrine\DBAL\Driver\Connection * @return Doctrine\DBAL\Driver\Connection
*/ */
public function getWrappedConnection() public function getWrappedConnection()
{ {
$this->connect(); $this->connect();
return $this->_conn; return $this->_conn;
} }
/** /**
* Gets the SchemaManager that can be used to inspect or change the * Gets the SchemaManager that can be used to inspect or change the
* database schema through the connection. * database schema through the connection.
* *
* @return Doctrine\DBAL\Schema\SchemaManager * @return Doctrine\DBAL\Schema\SchemaManager
*/ */
public function getSchemaManager() public function getSchemaManager()
{ {
if ( ! $this->_schemaManager) { if ( ! $this->_schemaManager) {
$this->_schemaManager = $this->_driver->getSchemaManager($this); $this->_schemaManager = $this->_driver->getSchemaManager($this);
} }
return $this->_schemaManager; return $this->_schemaManager;
} }
} }
\ No newline at end of file
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