@@ -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 | } |
@@ -2567,9 +2567,9 @@ |
||
| 2567 | 2567 | |
| 2568 | 2568 | // double up any identifier quotes to escape them |
| 2569 | 2569 | return $quote_character . |
| 2570 | - str_replace( |
|
| 2571 | - $quote_character, $quote_character . $quote_character, $part |
|
| 2572 | - ) . $quote_character; |
|
| 2570 | + str_replace( |
|
| 2571 | + $quote_character, $quote_character . $quote_character, $part |
|
| 2572 | + ) . $quote_character; |
|
| 2573 | 2573 | } |
| 2574 | 2574 | |
| 2575 | 2575 | /** |
@@ -981,10 +981,10 @@ discard block |
||
| 981 | 981 | if ($result !== false && isset($result->$alias)) { |
| 982 | 982 | if (!is_numeric($result->$alias)) { |
| 983 | 983 | $return_value = $result->$alias; |
| 984 | - } elseif ((int)$result->$alias == (float)$result->$alias) { |
|
| 985 | - $return_value = (int)$result->$alias; |
|
| 984 | + } elseif ((int) $result->$alias == (float) $result->$alias) { |
|
| 985 | + $return_value = (int) $result->$alias; |
|
| 986 | 986 | } else { |
| 987 | - $return_value = (float)$result->$alias; |
|
| 987 | + $return_value = (float) $result->$alias; |
|
| 988 | 988 | } |
| 989 | 989 | } |
| 990 | 990 | |
@@ -2471,7 +2471,7 @@ discard block |
||
| 2471 | 2471 | $fragment = 'LIMIT'; |
| 2472 | 2472 | } |
| 2473 | 2473 | |
| 2474 | - $this->_limit = (int)$this->_limit; |
|
| 2474 | + $this->_limit = (int) $this->_limit; |
|
| 2475 | 2475 | |
| 2476 | 2476 | $fragment .= " {$this->_limit}"; |
| 2477 | 2477 | } |
@@ -2490,7 +2490,7 @@ discard block |
||
| 2490 | 2490 | $clause = 'TO'; |
| 2491 | 2491 | } |
| 2492 | 2492 | |
| 2493 | - $this->_offset = (int)$this->_offset; |
|
| 2493 | + $this->_offset = (int) $this->_offset; |
|
| 2494 | 2494 | |
| 2495 | 2495 | return "$clause " . $this->_offset; |
| 2496 | 2496 | } |
@@ -3093,8 +3093,7 @@ discard block |
||
| 3093 | 3093 | |
| 3094 | 3094 | return static::_execute( |
| 3095 | 3095 | join(" ", $query), is_array($this->id(true)) ? |
| 3096 | - array_values($this->id(true)) : |
|
| 3097 | - array($this->id(true)), $this->_connection_name |
|
| 3096 | + array_values($this->id(true)) : array($this->id(true)), $this->_connection_name |
|
| 3098 | 3097 | ); |
| 3099 | 3098 | } |
| 3100 | 3099 | |
@@ -1099,7 +1099,7 @@ discard block |
||
| 1099 | 1099 | * the alias to return the column as. |
| 1100 | 1100 | * |
| 1101 | 1101 | * @param string $column |
| 1102 | - * @param mixed $alias |
|
| 1102 | + * @param null|string $alias |
|
| 1103 | 1103 | * |
| 1104 | 1104 | * @return ORM |
| 1105 | 1105 | */ |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | * the alias to return the column as. |
| 1117 | 1117 | * |
| 1118 | 1118 | * @param string $expr |
| 1119 | - * @param mixed $alias |
|
| 1119 | + * @param string|null $alias |
|
| 1120 | 1120 | * |
| 1121 | 1121 | * @return ORM |
| 1122 | 1122 | */ |
@@ -1405,7 +1405,7 @@ discard block |
||
| 1405 | 1405 | * Internal method to add a HAVING condition to the query |
| 1406 | 1406 | */ |
| 1407 | 1407 | /** |
| 1408 | - * @param string|array $column_name |
|
| 1408 | + * @param string $column_name |
|
| 1409 | 1409 | * @param string $separator |
| 1410 | 1410 | * @param mixed $value |
| 1411 | 1411 | * |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | * Internal method to add a HAVING clause with multiple values (like IN and NOT IN) |
| 1421 | 1421 | */ |
| 1422 | 1422 | /** |
| 1423 | - * @param string|array $column_name |
|
| 1423 | + * @param string $column_name |
|
| 1424 | 1424 | * @param string $separator |
| 1425 | 1425 | * @param mixed $values |
| 1426 | 1426 | * |
@@ -1447,7 +1447,7 @@ discard block |
||
| 1447 | 1447 | /** |
| 1448 | 1448 | * Internal method to add a HAVING clause with no parameters(like IS NULL and IS NOT NULL) |
| 1449 | 1449 | * |
| 1450 | - * @param string|array $column_name |
|
| 1450 | + * @param string $column_name |
|
| 1451 | 1451 | * @param string $operator |
| 1452 | 1452 | * |
| 1453 | 1453 | * @return ORM |
@@ -1485,7 +1485,7 @@ discard block |
||
| 1485 | 1485 | /** |
| 1486 | 1486 | * Internal method to add a WHERE condition to the query |
| 1487 | 1487 | * |
| 1488 | - * @param string|array $column_name |
|
| 1488 | + * @param string $column_name |
|
| 1489 | 1489 | * @param string $separator |
| 1490 | 1490 | * @param mixed $value |
| 1491 | 1491 | * |
@@ -1499,7 +1499,7 @@ discard block |
||
| 1499 | 1499 | /** |
| 1500 | 1500 | * Add a WHERE clause with multiple values (like IN and NOT IN) |
| 1501 | 1501 | * |
| 1502 | - * @param string|array $column_name |
|
| 1502 | + * @param string $column_name |
|
| 1503 | 1503 | * @param string $separator |
| 1504 | 1504 | * @param mixed $values |
| 1505 | 1505 | * |
@@ -1654,7 +1654,7 @@ discard block |
||
| 1654 | 1654 | * |
| 1655 | 1655 | * @param mixed $value |
| 1656 | 1656 | * |
| 1657 | - * @return array |
|
| 1657 | + * @return string |
|
| 1658 | 1658 | */ |
| 1659 | 1659 | protected function _get_compound_id_column_values($value) |
| 1660 | 1660 | { |
@@ -1954,7 +1954,7 @@ discard block |
||
| 1954 | 1954 | * contain question mark placeholders, which will be bound |
| 1955 | 1955 | * to the parameters supplied in the second argument. |
| 1956 | 1956 | * |
| 1957 | - * @param $clause |
|
| 1957 | + * @param string $clause |
|
| 1958 | 1958 | * @param array $parameters |
| 1959 | 1959 | * |
| 1960 | 1960 | * @return $this|ORM |
@@ -2503,7 +2503,7 @@ discard block |
||
| 2503 | 2503 | * only adds the pieces if they are not empty. |
| 2504 | 2504 | * |
| 2505 | 2505 | * @param string $glue |
| 2506 | - * @param array $pieces |
|
| 2506 | + * @param string[] $pieces |
|
| 2507 | 2507 | * |
| 2508 | 2508 | * @return string |
| 2509 | 2509 | */ |
@@ -2592,7 +2592,7 @@ discard block |
||
| 2592 | 2592 | * @param null|string $table_name |
| 2593 | 2593 | * @param string $connection_name |
| 2594 | 2594 | * |
| 2595 | - * @return mixed|string |
|
| 2595 | + * @return string |
|
| 2596 | 2596 | */ |
| 2597 | 2597 | protected static function _create_cache_key($query, $parameters, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) |
| 2598 | 2598 | { |