@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | * the alias to return the column as. |
1103 | 1103 | * |
1104 | 1104 | * @param string $column |
1105 | - * @param mixed $alias |
|
1105 | + * @param null|string $alias |
|
1106 | 1106 | * |
1107 | 1107 | * @return ORM |
1108 | 1108 | */ |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | * the alias to return the column as. |
1120 | 1120 | * |
1121 | 1121 | * @param string $expr |
1122 | - * @param mixed $alias |
|
1122 | + * @param string|null $alias |
|
1123 | 1123 | * |
1124 | 1124 | * @return ORM |
1125 | 1125 | */ |
@@ -1407,7 +1407,7 @@ discard block |
||
1407 | 1407 | * Internal method to add a HAVING condition to the query |
1408 | 1408 | */ |
1409 | 1409 | /** |
1410 | - * @param string|array $column_name |
|
1410 | + * @param string $column_name |
|
1411 | 1411 | * @param string $separator |
1412 | 1412 | * @param mixed $value |
1413 | 1413 | * |
@@ -1422,7 +1422,7 @@ discard block |
||
1422 | 1422 | * Internal method to add a HAVING clause with multiple values (like IN and NOT IN) |
1423 | 1423 | */ |
1424 | 1424 | /** |
1425 | - * @param string|array $column_name |
|
1425 | + * @param string $column_name |
|
1426 | 1426 | * @param string $separator |
1427 | 1427 | * @param mixed $values |
1428 | 1428 | * |
@@ -1449,7 +1449,7 @@ discard block |
||
1449 | 1449 | /** |
1450 | 1450 | * Internal method to add a HAVING clause with no parameters(like IS NULL and IS NOT NULL) |
1451 | 1451 | * |
1452 | - * @param string|array $column_name |
|
1452 | + * @param string $column_name |
|
1453 | 1453 | * @param string $operator |
1454 | 1454 | * |
1455 | 1455 | * @return ORM |
@@ -1487,7 +1487,7 @@ discard block |
||
1487 | 1487 | /** |
1488 | 1488 | * Internal method to add a WHERE condition to the query |
1489 | 1489 | * |
1490 | - * @param string|array $column_name |
|
1490 | + * @param string $column_name |
|
1491 | 1491 | * @param string $separator |
1492 | 1492 | * @param mixed $value |
1493 | 1493 | * |
@@ -1501,7 +1501,7 @@ discard block |
||
1501 | 1501 | /** |
1502 | 1502 | * Add a WHERE clause with multiple values (like IN and NOT IN) |
1503 | 1503 | * |
1504 | - * @param string|array $column_name |
|
1504 | + * @param string $column_name |
|
1505 | 1505 | * @param string $separator |
1506 | 1506 | * @param mixed $values |
1507 | 1507 | * |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | /** |
1529 | 1529 | * Add a WHERE clause with no parameters(like IS NULL and IS NOT NULL) |
1530 | 1530 | * |
1531 | - * @param string|array $column_name |
|
1531 | + * @param string $column_name |
|
1532 | 1532 | * @param string $operator |
1533 | 1533 | * |
1534 | 1534 | * @return ORM |
@@ -1657,7 +1657,7 @@ discard block |
||
1657 | 1657 | * |
1658 | 1658 | * @param mixed $value |
1659 | 1659 | * |
1660 | - * @return array |
|
1660 | + * @return string |
|
1661 | 1661 | */ |
1662 | 1662 | protected function _get_compound_id_column_values($value) |
1663 | 1663 | { |
@@ -2509,7 +2509,7 @@ discard block |
||
2509 | 2509 | * only adds the pieces if they are not empty. |
2510 | 2510 | * |
2511 | 2511 | * @param string $glue |
2512 | - * @param array $pieces |
|
2512 | + * @param string[] $pieces |
|
2513 | 2513 | * |
2514 | 2514 | * @return string |
2515 | 2515 | */ |
@@ -2598,7 +2598,7 @@ discard block |
||
2598 | 2598 | * @param null|string $table_name |
2599 | 2599 | * @param string $connection_name |
2600 | 2600 | * |
2601 | - * @return mixed|string |
|
2601 | + * @return string |
|
2602 | 2602 | */ |
2603 | 2603 | protected static function _create_cache_key($query, $parameters, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) |
2604 | 2604 | { |
@@ -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 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $rows = array(); |
59 | 59 | $args = func_get_args(); |
60 | 60 | |
61 | - foreach($this->_results as $key => $row) { |
|
61 | + foreach ($this->_results as $key => $row) { |
|
62 | 62 | if ( |
63 | 63 | is_object($row) |
64 | 64 | && |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | if (method_exists($model, $method)) { |
184 | 184 | call_user_func_array(array($model, $method), $params); |
185 | 185 | } else { |
186 | - throw new IdiormMethodMissingException("Method $method() does not exist in class " . get_class($this)); |
|
186 | + throw new IdiormMethodMissingException("Method $method() does not exist in class ".get_class($this)); |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function __construct($subject) |
64 | 64 | { |
65 | - $this->subject = (string)$subject; |
|
65 | + $this->subject = (string) $subject; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | | ([^\'"\\\\]+) # or $2: an unquoted chunk (no escapes). |
118 | 118 | /sx'; |
119 | 119 | |
120 | - return (string)preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject); |
|
120 | + return (string) preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // Process only unquoted chunks (in group $2). |
142 | - return (string)preg_replace('/' . preg_quote($this->search, '/') . '/', $this->replace, $matches[2]); |
|
142 | + return (string) preg_replace('/'.preg_quote($this->search, '/').'/', $this->replace, $matches[2]); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $contact->save(); |
48 | 48 | |
49 | 49 | // Redirect to self. |
50 | - header('Location: ' . basename(__FILE__)); |
|
50 | + header('Location: '.basename(__FILE__)); |
|
51 | 51 | exit; |
52 | 52 | } |
53 | 53 |