@@ -1349,14 +1349,14 @@ |
||
1349 | 1349 | * Add an LEFT JOIN source to the query |
1350 | 1350 | */ |
1351 | 1351 | public function left_join($table, $constraint, $table_alias = null) { |
1352 | - return $this->_add_join_source("LEFT", $table, $constraint, $table_alias); |
|
1352 | + return $this->_add_join_source("LEFT", $table, $constraint, $table_alias); |
|
1353 | 1353 | } |
1354 | 1354 | |
1355 | 1355 | /** |
1356 | 1356 | * Add an RIGHT JOIN source to the query |
1357 | 1357 | */ |
1358 | 1358 | public function right_join($table, $constraint, $table_alias = null) { |
1359 | - return $this->_add_join_source("RIGHT", $table, $constraint, $table_alias); |
|
1359 | + return $this->_add_join_source("RIGHT", $table, $constraint, $table_alias); |
|
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | /** |
@@ -983,10 +983,10 @@ discard block |
||
983 | 983 | if ($result !== false && isset($result->$alias)) { |
984 | 984 | if (!is_numeric($result->$alias)) { |
985 | 985 | $return_value = $result->$alias; |
986 | - } elseif ((int)$result->$alias == (float)$result->$alias) { |
|
987 | - $return_value = (int)$result->$alias; |
|
986 | + } elseif ((int) $result->$alias == (float) $result->$alias) { |
|
987 | + $return_value = (int) $result->$alias; |
|
988 | 988 | } else { |
989 | - $return_value = (float)$result->$alias; |
|
989 | + $return_value = (float) $result->$alias; |
|
990 | 990 | } |
991 | 991 | } |
992 | 992 | |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | protected function _add_result_column($expr, $alias = null) |
1070 | 1070 | { |
1071 | 1071 | if (null !== $alias) { |
1072 | - $expr .= ' AS ' . $this->_quote_identifier($alias); |
|
1072 | + $expr .= ' AS '.$this->_quote_identifier($alias); |
|
1073 | 1073 | } |
1074 | 1074 | |
1075 | 1075 | if ($this->_using_default_result_columns) { |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | /** |
1356 | 1356 | * Add an RIGHT JOIN source to the query |
1357 | 1357 | */ |
1358 | - public function right_join($table, $constraint, $table_alias = null) { |
|
1358 | + public function right_join($table, $constraint, $table_alias = null) { |
|
1359 | 1359 | return $this->_add_join_source("RIGHT", $table, $constraint, $table_alias); |
1360 | 1360 | } |
1361 | 1361 | |
@@ -1809,7 +1809,7 @@ discard block |
||
1809 | 1809 | |
1810 | 1810 | $query[] = $this->_quote_identifier($key); |
1811 | 1811 | $data[] = $subItem; |
1812 | - $query[] = $op . ' ?'; |
|
1812 | + $query[] = $op.' ?'; |
|
1813 | 1813 | } |
1814 | 1814 | } |
1815 | 1815 | $query[] = '))'; |
@@ -2380,13 +2380,13 @@ discard block |
||
2380 | 2380 | } |
2381 | 2381 | |
2382 | 2382 | if ($this->_distinct) { |
2383 | - $result_columns = 'DISTINCT ' . $result_columns; |
|
2383 | + $result_columns = 'DISTINCT '.$result_columns; |
|
2384 | 2384 | } |
2385 | 2385 | |
2386 | - $fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name); |
|
2386 | + $fragment .= "{$result_columns} FROM ".$this->_quote_identifier($this->_table_name); |
|
2387 | 2387 | |
2388 | 2388 | if (null !== $this->_table_alias) { |
2389 | - $fragment .= ' ' . $this->_quote_identifier($this->_table_alias); |
|
2389 | + $fragment .= ' '.$this->_quote_identifier($this->_table_alias); |
|
2390 | 2390 | } |
2391 | 2391 | |
2392 | 2392 | return $fragment; |
@@ -2429,7 +2429,7 @@ discard block |
||
2429 | 2429 | return ''; |
2430 | 2430 | } |
2431 | 2431 | |
2432 | - return 'GROUP BY ' . implode(', ', $this->_group_by); |
|
2432 | + return 'GROUP BY '.implode(', ', $this->_group_by); |
|
2433 | 2433 | } |
2434 | 2434 | |
2435 | 2435 | /** |
@@ -2454,7 +2454,7 @@ discard block |
||
2454 | 2454 | $this->_values = array_merge($this->_values, $condition[static::CONDITION_VALUES]); |
2455 | 2455 | } |
2456 | 2456 | |
2457 | - return strtoupper($type) . ' ' . implode(' AND ', $conditions); |
|
2457 | + return strtoupper($type).' '.implode(' AND ', $conditions); |
|
2458 | 2458 | } |
2459 | 2459 | |
2460 | 2460 | /** |
@@ -2468,7 +2468,7 @@ discard block |
||
2468 | 2468 | |
2469 | 2469 | $db = static::get_db(self::DEFAULT_CONNECTION); |
2470 | 2470 | |
2471 | - return 'ORDER BY ' . trim($db->quote(implode(', ', $this->_order_by)), "'"); |
|
2471 | + return 'ORDER BY '.trim($db->quote(implode(', ', $this->_order_by)), "'"); |
|
2472 | 2472 | } |
2473 | 2473 | |
2474 | 2474 | /** |
@@ -2490,7 +2490,7 @@ discard block |
||
2490 | 2490 | $fragment = 'LIMIT'; |
2491 | 2491 | } |
2492 | 2492 | |
2493 | - $this->_limit = (int)$this->_limit; |
|
2493 | + $this->_limit = (int) $this->_limit; |
|
2494 | 2494 | |
2495 | 2495 | $fragment .= " {$this->_limit}"; |
2496 | 2496 | } |
@@ -2509,9 +2509,9 @@ discard block |
||
2509 | 2509 | $clause = 'TO'; |
2510 | 2510 | } |
2511 | 2511 | |
2512 | - $this->_offset = (int)$this->_offset; |
|
2512 | + $this->_offset = (int) $this->_offset; |
|
2513 | 2513 | |
2514 | - return "$clause " . $this->_offset; |
|
2514 | + return "$clause ".$this->_offset; |
|
2515 | 2515 | } |
2516 | 2516 | |
2517 | 2517 | return ''; |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | $quote_character = static::$_config[$this->_connection_name]['identifier_quote_character']; |
2598 | 2598 | |
2599 | 2599 | // double up any identifier quotes to escape them |
2600 | - return $quote_character . str_replace($quote_character, $quote_character . $quote_character, $part) . $quote_character; |
|
2600 | + return $quote_character.str_replace($quote_character, $quote_character.$quote_character, $part).$quote_character; |
|
2601 | 2601 | } |
2602 | 2602 | |
2603 | 2603 | /** |
@@ -2628,7 +2628,7 @@ discard block |
||
2628 | 2628 | ); |
2629 | 2629 | } |
2630 | 2630 | $parameter_string = implode(',', $parameters); |
2631 | - $key = $query . ':' . $parameter_string; |
|
2631 | + $key = $query.':'.$parameter_string; |
|
2632 | 2632 | |
2633 | 2633 | return sha1($key); |
2634 | 2634 | } |
@@ -3090,14 +3090,14 @@ discard block |
||
3090 | 3090 | $query[] = 'INSERT INTO'; |
3091 | 3091 | $query[] = $this->_quote_identifier($this->_table_name); |
3092 | 3092 | $field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields)); |
3093 | - $query[] = '(' . implode(', ', $field_list) . ')'; |
|
3093 | + $query[] = '('.implode(', ', $field_list).')'; |
|
3094 | 3094 | $query[] = 'VALUES'; |
3095 | 3095 | |
3096 | 3096 | $placeholders = $this->_create_placeholders($this->_dirty_fields); |
3097 | 3097 | $query[] = "({$placeholders})"; |
3098 | 3098 | |
3099 | 3099 | if (static::get_db($this->_connection_name)->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'pgsql') { |
3100 | - $query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name()); |
|
3100 | + $query[] = 'RETURNING '.$this->_quote_identifier($this->_get_id_column_name()); |
|
3101 | 3101 | } |
3102 | 3102 | |
3103 | 3103 | return implode(' ', $query); |
@@ -3116,8 +3116,7 @@ discard block |
||
3116 | 3116 | |
3117 | 3117 | return static::_execute( |
3118 | 3118 | implode(' ', $query), is_array($this->id(true)) ? |
3119 | - array_values($this->id(true)) : |
|
3120 | - array($this->id(true)), $this->_connection_name |
|
3119 | + array_values($this->id(true)) : array($this->id(true)), $this->_connection_name |
|
3121 | 3120 | ); |
3122 | 3121 | } |
3123 | 3122 | |
@@ -3213,7 +3212,7 @@ discard block |
||
3213 | 3212 | if (method_exists($this, $method)) { |
3214 | 3213 | return call_user_func_array(array($this, $method), $arguments); |
3215 | 3214 | } else { |
3216 | - throw new IdiormMethodMissingException("Method $name() does not exist in class " . get_class($this)); |
|
3215 | + throw new IdiormMethodMissingException("Method $name() does not exist in class ".get_class($this)); |
|
3217 | 3216 | } |
3218 | 3217 | } |
3219 | 3218 |