Commit 5a587d16 by Gevik Babakhani

Fixed several formatting issues.

Refactored == null to is_null == '' to empty(...)
parent cceb5b11
......@@ -16,13 +16,14 @@ namespace yii\db\pgsql;
* @author Gevik babakhani <gevikb@gmail.com>
* @since 2.0
*/
class PDO extends \PDO {
class PDO extends \PDO
{
const OPT_SEARCH_PATH = 'search_path';
const OPT_DEFAULT_SCHEMA = 'default_schema';
const DEFAULT_SCHEMA = 'public';
private $_currentDatabase = null;
private $_currentDatabase;
/**
* Returns value of the last inserted ID.
......@@ -53,11 +54,11 @@ class PDO extends \PDO {
}
if (isset($options[self::OPT_DEFAULT_SCHEMA])) {
$schema = trim($options[self::OPT_DEFAULT_SCHEMA]);
if ($schema !== '') {
if (!empty($schema)) {
Schema::$DEFAULT_SCHEMA = $schema;
}
}
if (Schema::$DEFAULT_SCHEMA === null || Schema::$DEFAULT_SCHEMA === '') {
if (is_null(Schema::$DEFAULT_SCHEMA) || empty(Schema::$DEFAULT_SCHEMA)) {
Schema::$DEFAULT_SCHEMA = self::DEFAULT_SCHEMA;
}
}
......
......@@ -14,7 +14,8 @@ namespace yii\db\pgsql;
* @author Gevik Babakhani <gevikb@gmail.com>
* @since 2.0
*/
class QueryBuilder extends \yii\db\QueryBuilder {
class QueryBuilder extends \yii\db\QueryBuilder
{
/**
* @var array mapping from abstract column types (keys) to physical column types (values).
......
......@@ -18,7 +18,8 @@ use yii\db\ColumnSchema;
* @author Gevik Babakhani <gevikb@gmail.com>
* @since 2.0
*/
class Schema extends \yii\db\Schema {
class Schema extends \yii\db\Schema
{
/**
* The default schema used for the current session. This value is
......
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