@@ -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 | |
@@ -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 | { |
@@ -58,7 +58,7 @@ |
||
| 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 | && |