@@ -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 | { |
@@ -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) { |
@@ -1795,7 +1795,7 @@ discard block |
||
1795 | 1795 | |
1796 | 1796 | $query[] = $this->_quote_identifier($key); |
1797 | 1797 | $data[] = $subItem; |
1798 | - $query[] = $op . ' ?'; |
|
1798 | + $query[] = $op.' ?'; |
|
1799 | 1799 | } |
1800 | 1800 | } |
1801 | 1801 | $query[] = '))'; |
@@ -2366,13 +2366,13 @@ discard block |
||
2366 | 2366 | } |
2367 | 2367 | |
2368 | 2368 | if ($this->_distinct) { |
2369 | - $result_columns = 'DISTINCT ' . $result_columns; |
|
2369 | + $result_columns = 'DISTINCT '.$result_columns; |
|
2370 | 2370 | } |
2371 | 2371 | |
2372 | - $fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name); |
|
2372 | + $fragment .= "{$result_columns} FROM ".$this->_quote_identifier($this->_table_name); |
|
2373 | 2373 | |
2374 | 2374 | if (null !== $this->_table_alias) { |
2375 | - $fragment .= ' ' . $this->_quote_identifier($this->_table_alias); |
|
2375 | + $fragment .= ' '.$this->_quote_identifier($this->_table_alias); |
|
2376 | 2376 | } |
2377 | 2377 | |
2378 | 2378 | return $fragment; |
@@ -2415,7 +2415,7 @@ discard block |
||
2415 | 2415 | return ''; |
2416 | 2416 | } |
2417 | 2417 | |
2418 | - return 'GROUP BY ' . implode(', ', $this->_group_by); |
|
2418 | + return 'GROUP BY '.implode(', ', $this->_group_by); |
|
2419 | 2419 | } |
2420 | 2420 | |
2421 | 2421 | /** |
@@ -2440,7 +2440,7 @@ discard block |
||
2440 | 2440 | $this->_values = array_merge($this->_values, $condition[static::CONDITION_VALUES]); |
2441 | 2441 | } |
2442 | 2442 | |
2443 | - return strtoupper($type) . ' ' . implode(' AND ', $conditions); |
|
2443 | + return strtoupper($type).' '.implode(' AND ', $conditions); |
|
2444 | 2444 | } |
2445 | 2445 | |
2446 | 2446 | /** |
@@ -2454,7 +2454,7 @@ discard block |
||
2454 | 2454 | |
2455 | 2455 | $db = static::get_db(self::DEFAULT_CONNECTION); |
2456 | 2456 | |
2457 | - return 'ORDER BY ' . trim($db->quote(implode(', ', $this->_order_by)), "'"); |
|
2457 | + return 'ORDER BY '.trim($db->quote(implode(', ', $this->_order_by)), "'"); |
|
2458 | 2458 | } |
2459 | 2459 | |
2460 | 2460 | /** |
@@ -2476,7 +2476,7 @@ discard block |
||
2476 | 2476 | $fragment = 'LIMIT'; |
2477 | 2477 | } |
2478 | 2478 | |
2479 | - $this->_limit = (int)$this->_limit; |
|
2479 | + $this->_limit = (int) $this->_limit; |
|
2480 | 2480 | |
2481 | 2481 | $fragment .= " {$this->_limit}"; |
2482 | 2482 | } |
@@ -2495,9 +2495,9 @@ discard block |
||
2495 | 2495 | $clause = 'TO'; |
2496 | 2496 | } |
2497 | 2497 | |
2498 | - $this->_offset = (int)$this->_offset; |
|
2498 | + $this->_offset = (int) $this->_offset; |
|
2499 | 2499 | |
2500 | - return "$clause " . $this->_offset; |
|
2500 | + return "$clause ".$this->_offset; |
|
2501 | 2501 | } |
2502 | 2502 | |
2503 | 2503 | return ''; |
@@ -2583,7 +2583,7 @@ discard block |
||
2583 | 2583 | $quote_character = static::$_config[$this->_connection_name]['identifier_quote_character']; |
2584 | 2584 | |
2585 | 2585 | // double up any identifier quotes to escape them |
2586 | - return $quote_character . str_replace($quote_character, $quote_character . $quote_character, $part) . $quote_character; |
|
2586 | + return $quote_character.str_replace($quote_character, $quote_character.$quote_character, $part).$quote_character; |
|
2587 | 2587 | } |
2588 | 2588 | |
2589 | 2589 | /** |
@@ -2614,7 +2614,7 @@ discard block |
||
2614 | 2614 | ); |
2615 | 2615 | } |
2616 | 2616 | $parameter_string = implode(',', $parameters); |
2617 | - $key = $query . ':' . $parameter_string; |
|
2617 | + $key = $query.':'.$parameter_string; |
|
2618 | 2618 | |
2619 | 2619 | return sha1($key); |
2620 | 2620 | } |
@@ -3076,14 +3076,14 @@ discard block |
||
3076 | 3076 | $query[] = 'INSERT INTO'; |
3077 | 3077 | $query[] = $this->_quote_identifier($this->_table_name); |
3078 | 3078 | $field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields)); |
3079 | - $query[] = '(' . implode(', ', $field_list) . ')'; |
|
3079 | + $query[] = '('.implode(', ', $field_list).')'; |
|
3080 | 3080 | $query[] = 'VALUES'; |
3081 | 3081 | |
3082 | 3082 | $placeholders = $this->_create_placeholders($this->_dirty_fields); |
3083 | 3083 | $query[] = "({$placeholders})"; |
3084 | 3084 | |
3085 | 3085 | if (static::get_db($this->_connection_name)->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'pgsql') { |
3086 | - $query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name()); |
|
3086 | + $query[] = 'RETURNING '.$this->_quote_identifier($this->_get_id_column_name()); |
|
3087 | 3087 | } |
3088 | 3088 | |
3089 | 3089 | return implode(' ', $query); |
@@ -3102,8 +3102,7 @@ discard block |
||
3102 | 3102 | |
3103 | 3103 | return static::_execute( |
3104 | 3104 | implode(' ', $query), is_array($this->id(true)) ? |
3105 | - array_values($this->id(true)) : |
|
3106 | - array($this->id(true)), $this->_connection_name |
|
3105 | + array_values($this->id(true)) : array($this->id(true)), $this->_connection_name |
|
3107 | 3106 | ); |
3108 | 3107 | } |
3109 | 3108 | |
@@ -3199,7 +3198,7 @@ discard block |
||
3199 | 3198 | if (method_exists($this, $method)) { |
3200 | 3199 | return call_user_func_array(array($this, $method), $arguments); |
3201 | 3200 | } else { |
3202 | - throw new IdiormMethodMissingException("Method $name() does not exist in class " . get_class($this)); |
|
3201 | + throw new IdiormMethodMissingException("Method $name() does not exist in class ".get_class($this)); |
|
3203 | 3202 | } |
3204 | 3203 | } |
3205 | 3204 |
@@ -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 |
@@ -197,7 +197,7 @@ |
||
197 | 197 | if (method_exists($model, $method)) { |
198 | 198 | call_user_func_array(array($model, $method), $params); |
199 | 199 | } else { |
200 | - throw new IdiormMethodMissingException("Method $method() does not exist in class " . get_class($this)); |
|
200 | + throw new IdiormMethodMissingException("Method $method() does not exist in class ".get_class($this)); |
|
201 | 201 | } |
202 | 202 | } |
203 | 203 |