Remove the last of the one line if statements

This commit is contained in:
Timothy Warren 2015-11-11 15:44:24 -05:00
parent 61112ffc03
commit c0674d5faa
3 changed files with 12 additions and 3 deletions

View File

@ -584,7 +584,10 @@ abstract class AbstractDriver extends \PDO implements DriverInterface {
public function insert_batch($table, $data=array()) public function insert_batch($table, $data=array())
{ {
$first_row = current($data); $first_row = current($data);
if ( ! is_array($first_row)) return NULL; if ( ! is_array($first_row))
{
return NULL;
}
// Values for insertion // Values for insertion
$vals = array(); $vals = array();

View File

@ -221,7 +221,10 @@ final class ConnectionManager {
*/ */
private function create_dsn($dbtype, \stdClass $params) private function create_dsn($dbtype, \stdClass $params)
{ {
if (strtolower($dbtype) === 'pdo_firebird') $dbtype = 'firebird'; if (strtolower($dbtype) === 'pdo_firebird')
{
$dbtype = 'firebird';
}
$pairs = array(); $pairs = array();

View File

@ -186,7 +186,10 @@ class Driver extends \Query\AbstractDriver {
public function query($sql = '') public function query($sql = '')
{ {
if (empty($sql)) throw new \PDOException("Query method requires an sql query!", 0, NULL); if (empty($sql))
{
throw new \PDOException("Query method requires an sql query!", 0, NULL);
}
$this->statement_link = (isset($this->trans)) $this->statement_link = (isset($this->trans))
? \fbird_query($this->trans, $sql) ? \fbird_query($this->trans, $sql)