@@ -133,8 +133,7 @@ discard block |
||
133 | 133 | empty($this->MultipleActiveResultSets) OR $this->dsn .= ';MultipleActiveResultSets='.$this->MultipleActiveResultSets; |
134 | 134 | empty($this->TraceFile) OR $this->dsn .= ';TraceFile='.$this->TraceFile; |
135 | 135 | empty($this->WSID) OR $this->dsn .= ';WSID='.$this->WSID; |
136 | - } |
|
137 | - elseif (preg_match('/QuotedId=(0|1)/', $this->dsn, $match)) |
|
136 | + } elseif (preg_match('/QuotedId=(0|1)/', $this->dsn, $match)) |
|
138 | 137 | { |
139 | 138 | $this->_quoted_identifier = (bool) $match[1]; |
140 | 139 | } |
@@ -319,8 +318,7 @@ discard block |
||
319 | 318 | if (count($this->qb_select) === 0) |
320 | 319 | { |
321 | 320 | $select = '*'; // Inevitable |
322 | - } |
|
323 | - else |
|
321 | + } else |
|
324 | 322 | { |
325 | 323 | // Use only field names and their aliases, everything else is out of our scope. |
326 | 324 | $select = array(); |
@@ -341,11 +341,11 @@ discard block |
||
341 | 341 | $retval = array(); |
342 | 342 | for ($i = 0, $c = count($query); $i < $c; $i++) |
343 | 343 | { |
344 | - $retval[$i] = new stdClass(); |
|
344 | + $retval[$i] = new stdClass(); |
|
345 | 345 | $retval[$i]->name = $query[$i]->COLUMN_NAME; |
346 | 346 | $retval[$i]->type = $query[$i]->DATA_TYPE; |
347 | - $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
348 | - $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
347 | + $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
348 | + $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | return $retval; |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | ."\nWHERE ".$this->escape_identifiers('CI_rownum').' BETWEEN '.($this->qb_offset + 1).' AND '.$limit; |
502 | 502 | } |
503 | 503 | |
504 | - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); |
|
504 | + return preg_replace('/(^\SELECT (DISTINCT)?)/i', '\\1 TOP '.$limit.' ', $sql); |
|
505 | 505 | } |
506 | 506 | |
507 | 507 | // -------------------------------------------------------------------- |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * |
54 | 54 | * @var array |
55 | 55 | */ |
56 | - protected $_unsigned = array( |
|
56 | + protected $_unsigned = array( |
|
57 | 57 | 'INT2' => 'INTEGER', |
58 | 58 | 'SMALLINT' => 'INTEGER', |
59 | 59 | 'INT' => 'BIGINT', |
@@ -108,10 +108,10 @@ |
||
108 | 108 | $retval = array(); |
109 | 109 | for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) |
110 | 110 | { |
111 | - $retval[$i] = new stdClass(); |
|
111 | + $retval[$i] = new stdClass(); |
|
112 | 112 | $retval[$i]->name = pg_field_name($this->result_id, $i); |
113 | 113 | $retval[$i]->type = pg_field_type($this->result_id, $i); |
114 | - $retval[$i]->max_length = pg_field_size($this->result_id, $i); |
|
114 | + $retval[$i]->max_length = pg_field_size($this->result_id, $i); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return $retval; |
@@ -53,14 +53,14 @@ |
||
53 | 53 | * |
54 | 54 | * @var string |
55 | 55 | */ |
56 | - protected $_list_databases = 'SELECT datname FROM pg_database'; |
|
56 | + protected $_list_databases = 'SELECT datname FROM pg_database'; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * OPTIMIZE TABLE statement |
60 | 60 | * |
61 | 61 | * @var string |
62 | 62 | */ |
63 | - protected $_optimize_table = 'REINDEX TABLE %s'; |
|
63 | + protected $_optimize_table = 'REINDEX TABLE %s'; |
|
64 | 64 | |
65 | 65 | // -------------------------------------------------------------------- |
66 | 66 |
@@ -51,21 +51,21 @@ |
||
51 | 51 | * |
52 | 52 | * @var string |
53 | 53 | */ |
54 | - protected $_create_table_if = FALSE; |
|
54 | + protected $_create_table_if = FALSE; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * UNSIGNED support |
58 | 58 | * |
59 | 59 | * @var bool|array |
60 | 60 | */ |
61 | - protected $_unsigned = FALSE; |
|
61 | + protected $_unsigned = FALSE; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * NULL value representation in CREATE/ALTER TABLE statements |
65 | 65 | * |
66 | 66 | * @var string |
67 | 67 | */ |
68 | - protected $_null = 'NULL'; |
|
68 | + protected $_null = 'NULL'; |
|
69 | 69 | |
70 | 70 | // -------------------------------------------------------------------- |
71 | 71 |
@@ -95,8 +95,7 @@ |
||
95 | 95 | if ( ! file_exists($this->db->database) OR ! @unlink($this->db->database)) |
96 | 96 | { |
97 | 97 | return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; |
98 | - } |
|
99 | - elseif ( ! empty($this->db->data_cache['db_names'])) |
|
98 | + } elseif ( ! empty($this->db->data_cache['db_names'])) |
|
100 | 99 | { |
101 | 100 | $key = array_search(strtolower($this->db->database), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); |
102 | 101 | if ($key !== FALSE) |
@@ -274,11 +274,11 @@ |
||
274 | 274 | $retval = array(); |
275 | 275 | for ($i = 0, $c = count($query); $i < $c; $i++) |
276 | 276 | { |
277 | - $retval[$i] = new stdClass(); |
|
277 | + $retval[$i] = new stdClass(); |
|
278 | 278 | $retval[$i]->name = $query[$i]['name']; |
279 | 279 | $retval[$i]->type = $query[$i]['type']; |
280 | 280 | $retval[$i]->max_length = NULL; |
281 | - $retval[$i]->default = $query[$i]['dflt_value']; |
|
281 | + $retval[$i]->default = $query[$i]['dflt_value']; |
|
282 | 282 | $retval[$i]->primary_key = isset($query[$i]['pk']) ? (int) $query[$i]['pk'] : 0; |
283 | 283 | } |
284 | 284 |
@@ -88,8 +88,7 @@ |
||
88 | 88 | return ( ! $this->password) |
89 | 89 | ? new SQLite3($this->database) |
90 | 90 | : new SQLite3($this->database, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $this->password); |
91 | - } |
|
92 | - catch (Exception $e) |
|
91 | + } catch (Exception $e) |
|
93 | 92 | { |
94 | 93 | return FALSE; |
95 | 94 | } |
@@ -51,14 +51,14 @@ |
||
51 | 51 | * |
52 | 52 | * @var bool|array |
53 | 53 | */ |
54 | - protected $_unsigned = FALSE; |
|
54 | + protected $_unsigned = FALSE; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * NULL value representation in CREATE/ALTER TABLE statements |
58 | 58 | * |
59 | 59 | * @var string |
60 | 60 | */ |
61 | - protected $_null = 'NULL'; |
|
61 | + protected $_null = 'NULL'; |
|
62 | 62 | |
63 | 63 | // -------------------------------------------------------------------- |
64 | 64 |
@@ -112,8 +112,7 @@ |
||
112 | 112 | if ( ! @unlink($this->db->database)) |
113 | 113 | { |
114 | 114 | return $this->db->db_debug ? $this->db->display_error('db_unable_to_drop') : FALSE; |
115 | - } |
|
116 | - elseif ( ! empty($this->db->data_cache['db_names'])) |
|
115 | + } elseif ( ! empty($this->db->data_cache['db_names'])) |
|
117 | 116 | { |
118 | 117 | $key = array_search(strtolower($this->db->database), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); |
119 | 118 | if ($key !== FALSE) |
@@ -100,13 +100,13 @@ |
||
100 | 100 | $retval = array(); |
101 | 101 | for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) |
102 | 102 | { |
103 | - $retval[$i] = new stdClass(); |
|
103 | + $retval[$i] = new stdClass(); |
|
104 | 104 | $retval[$i]->name = $this->result_id->columnName($i); |
105 | 105 | |
106 | 106 | $type = $this->result_id->columnType($i); |
107 | 107 | $retval[$i]->type = isset($data_types[$type]) ? $data_types[$type] : $type; |
108 | 108 | |
109 | - $retval[$i]->max_length = NULL; |
|
109 | + $retval[$i]->max_length = NULL; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $retval; |
@@ -158,8 +158,7 @@ |
||
158 | 158 | if (($row = $this->result_id->fetchArray(SQLITE3_ASSOC)) === FALSE) |
159 | 159 | { |
160 | 160 | return FALSE; |
161 | - } |
|
162 | - elseif ($class_name === 'stdClass') |
|
161 | + } elseif ($class_name === 'stdClass') |
|
163 | 162 | { |
164 | 163 | return (object) $row; |
165 | 164 | } |
@@ -341,11 +341,11 @@ discard block |
||
341 | 341 | $retval = array(); |
342 | 342 | for ($i = 0, $c = count($query); $i < $c; $i++) |
343 | 343 | { |
344 | - $retval[$i] = new stdClass(); |
|
344 | + $retval[$i] = new stdClass(); |
|
345 | 345 | $retval[$i]->name = $query[$i]->COLUMN_NAME; |
346 | 346 | $retval[$i]->type = $query[$i]->DATA_TYPE; |
347 | - $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
348 | - $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
347 | + $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
348 | + $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | return $retval; |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | ."\nWHERE ".$this->escape_identifiers('CI_rownum').' BETWEEN '.($this->qb_offset + 1).' AND '.$limit; |
502 | 502 | } |
503 | 503 | |
504 | - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); |
|
504 | + return preg_replace('/(^\SELECT (DISTINCT)?)/i', '\\1 TOP '.$limit.' ', $sql); |
|
505 | 505 | } |
506 | 506 | |
507 | 507 | // -------------------------------------------------------------------- |
@@ -375,8 +375,7 @@ discard block |
||
375 | 375 | if (isset($sqlsrv_error['SQLSTATE'])) |
376 | 376 | { |
377 | 377 | $error['code'] = isset($sqlsrv_error['code']) ? $sqlsrv_error['SQLSTATE'].'/'.$sqlsrv_error['code'] : $sqlsrv_error['SQLSTATE']; |
378 | - } |
|
379 | - elseif (isset($sqlsrv_error['code'])) |
|
378 | + } elseif (isset($sqlsrv_error['code'])) |
|
380 | 379 | { |
381 | 380 | $error['code'] = $sqlsrv_error['code']; |
382 | 381 | } |
@@ -480,8 +479,7 @@ discard block |
||
480 | 479 | if (count($this->qb_select) === 0) |
481 | 480 | { |
482 | 481 | $select = '*'; // Inevitable |
483 | - } |
|
484 | - else |
|
482 | + } else |
|
485 | 483 | { |
486 | 484 | // Use only field names and their aliases, everything else is out of our scope. |
487 | 485 | $select = array(); |