Commit 65fbb9f7 authored by Guilherme Blanco's avatar Guilherme Blanco

Renamed fetchRow to fetchAssoc, as defined in @todo list. Renamed...

Renamed fetchRow to fetchAssoc, as defined in @todo list. Renamed getRollbackOnly to isRollbackOnly, since it is more consistent to its purpose.
parent b12b8b00
......@@ -310,9 +310,8 @@ class Connection implements DriverConnection
* @param string $statement The SQL query.
* @param array $params The query parameters.
* @return array
* @todo Rename: fetchAssoc
*/
public function fetchRow($statement, array $params = array())
public function fetchAssoc($statement, array $params = array())
{
return $this->executeQuery($statement, $params)->fetch(PDO::FETCH_ASSOC);
}
......@@ -583,10 +582,10 @@ class Connection implements DriverConnection
* represents a row of the result set.
* @return mixed The projected result of the query.
*/
public function project($query, array $params = array(), Closure $function)
public function project($query, array $params, Closure $function)
{
$result = array();
$stmt = $this->executeQuery($query, $params);
$stmt = $this->executeQuery($query, $params ?: array());
while ($row = $stmt->fetch()) {
$result[] = $function($row);
......@@ -820,7 +819,7 @@ class Connection implements DriverConnection
* @return boolean
* @throws ConnectionException If no transaction is active.
*/
public function getRollbackOnly()
public function isRollbackOnly()
{
if ($this->_transactionNestingLevel == 0) {
throw ConnectionException::noActiveTransaction();
......
......@@ -164,7 +164,7 @@ class EntityManager
*/
public function getTransaction()
{
return $this->_transaction;
return $this->_transaction;
}
/**
......
......@@ -158,6 +158,6 @@ final class EntityTransaction
*/
public function isRollbackOnly()
{
return $this->_conn->getRollbackOnly();
return $this->_conn->isRollbackOnly();
}
}
\ 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