@@ -132,7 +132,7 @@ |
||
132 | 132 | if (is_array($component)) { |
133 | 133 | return implode(', ', $component); |
134 | 134 | } else { |
135 | - return $component->column . ' = ' . $component->value; |
|
135 | + return $component->column.' = '.$component->value; |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
@@ -168,7 +168,7 @@ |
||
168 | 168 | if (is_array($component)) { |
169 | 169 | return implode(', ', $component); |
170 | 170 | } else { |
171 | - return $component->old . ' TO ' . $component->new; |
|
171 | + return $component->old.' TO '.$component->new; |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | || ($token->type === Token::TYPE_COMMENT) |
109 | 109 | ) { |
110 | 110 | $lastRaw .= $token->token; |
111 | - $lastValue = trim($lastValue) . ' '; |
|
111 | + $lastValue = trim($lastValue).' '; |
|
112 | 112 | continue; |
113 | 113 | } |
114 | 114 | |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | if (is_array($component)) { |
187 | 187 | return implode(', ', $component); |
188 | 188 | } elseif (!empty($component->raw)) { |
189 | - return '(' . implode(', ', $component->raw) . ')'; |
|
189 | + return '('.implode(', ', $component->raw).')'; |
|
190 | 190 | } else { |
191 | - return '(' . implode(', ', $component->values) . ')'; |
|
191 | + return '('.implode(', ', $component->values).')'; |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 | } |
@@ -188,21 +188,21 @@ |
||
188 | 188 | */ |
189 | 189 | public static function build($component, array $options = array()) |
190 | 190 | { |
191 | - $ret = $component->type . ' '; |
|
191 | + $ret = $component->type.' '; |
|
192 | 192 | if (!empty($component->name)) { |
193 | - $ret .= Context::escape($component->name) . ' '; |
|
193 | + $ret .= Context::escape($component->name).' '; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | $columns = array(); |
197 | 197 | foreach ($component->columns as $column) { |
198 | 198 | $tmp = Context::escape($column['name']); |
199 | 199 | if (isset($column['length'])) { |
200 | - $tmp .= '(' . $column['length'] . ')'; |
|
200 | + $tmp .= '('.$column['length'].')'; |
|
201 | 201 | } |
202 | 202 | $columns[] = $tmp; |
203 | 203 | } |
204 | 204 | |
205 | - $ret .= '(' . implode(',', $columns) . ') ' . $component->options; |
|
205 | + $ret .= '('.implode(',', $columns).') '.$component->options; |
|
206 | 206 | return trim($ret); |
207 | 207 | } |
208 | 208 | } |
@@ -146,15 +146,15 @@ |
||
146 | 146 | public static function build($component, array $options = array()) |
147 | 147 | { |
148 | 148 | if (is_array($component)) { |
149 | - return '(' . implode(', ', $component) . ')'; |
|
149 | + return '('.implode(', ', $component).')'; |
|
150 | 150 | } else { |
151 | 151 | $tmp = ''; |
152 | 152 | if (!empty($component->inOut)) { |
153 | - $tmp .= $component->inOut . ' '; |
|
153 | + $tmp .= $component->inOut.' '; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return trim( |
157 | - $tmp . Context::escape($component->name) . ' ' . $component->type |
|
157 | + $tmp.Context::escape($component->name).' '.$component->type |
|
158 | 158 | ); |
159 | 159 | } |
160 | 160 | } |
@@ -151,7 +151,7 @@ |
||
151 | 151 | { |
152 | 152 | return trim( |
153 | 153 | $component->table |
154 | - . ' (' . implode(', ', Context::escape($component->columns)) . ') ' |
|
154 | + . ' ('.implode(', ', Context::escape($component->columns)).') ' |
|
155 | 155 | . $component->options |
156 | 156 | ); |
157 | 157 | } |
@@ -139,7 +139,7 @@ |
||
139 | 139 | if (is_array($component)) { |
140 | 140 | return implode(', ', $component); |
141 | 141 | } else { |
142 | - return $component->expr . ' ' . $component->type; |
|
142 | + return $component->expr.' '.$component->type; |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
@@ -163,9 +163,9 @@ |
||
163 | 163 | |
164 | 164 | $parameters = ''; |
165 | 165 | if (!empty($component->parameters)) { |
166 | - $parameters = '(' . implode(',', $component->parameters) . ')'; |
|
166 | + $parameters = '('.implode(',', $component->parameters).')'; |
|
167 | 167 | } |
168 | 168 | |
169 | - return trim($name . $parameters . ' ' . $component->options); |
|
169 | + return trim($name.$parameters.' '.$component->options); |
|
170 | 170 | } |
171 | 171 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ':=' => 8, |
108 | 108 | |
109 | 109 | // @see Token::FLAG_OPERATOR_SQL |
110 | - '(' => 16, ')' => 16, '.' => 16, ',' => 16, ';' => 16, |
|
110 | + '(' => 16, ')' => 16, '.' => 16, ',' => 16, ';' => 16, |
|
111 | 111 | ); |
112 | 112 | |
113 | 113 | /** |
@@ -125,67 +125,67 @@ discard block |
||
125 | 125 | |
126 | 126 | // Compatibility mode for Microsoft's SQL server. |
127 | 127 | // This is the equivalent of ANSI_QUOTES. |
128 | - const COMPAT_MYSQL = 2; |
|
128 | + const COMPAT_MYSQL = 2; |
|
129 | 129 | |
130 | 130 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_allow_invalid_dates |
131 | - const ALLOW_INVALID_DATES = 1; |
|
131 | + const ALLOW_INVALID_DATES = 1; |
|
132 | 132 | |
133 | 133 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_ansi_quotes |
134 | - const ANSI_QUOTES = 2; |
|
134 | + const ANSI_QUOTES = 2; |
|
135 | 135 | |
136 | 136 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_error_for_division_by_zero |
137 | - const ERROR_FOR_DIVISION_BY_ZERO = 4; |
|
137 | + const ERROR_FOR_DIVISION_BY_ZERO = 4; |
|
138 | 138 | |
139 | 139 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_high_not_precedence |
140 | - const HIGH_NOT_PRECEDENCE = 8; |
|
140 | + const HIGH_NOT_PRECEDENCE = 8; |
|
141 | 141 | |
142 | 142 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_ignore_space |
143 | - const IGNORE_SPACE = 16; |
|
143 | + const IGNORE_SPACE = 16; |
|
144 | 144 | |
145 | 145 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_auto_create_user |
146 | - const NO_AUTO_CREATE_USER = 32; |
|
146 | + const NO_AUTO_CREATE_USER = 32; |
|
147 | 147 | |
148 | 148 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_auto_value_on_zero |
149 | - const NO_AUTO_VALUE_ON_ZERO = 64; |
|
149 | + const NO_AUTO_VALUE_ON_ZERO = 64; |
|
150 | 150 | |
151 | 151 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_backslash_escapes |
152 | - const NO_BACKSLASH_ESCAPES = 128; |
|
152 | + const NO_BACKSLASH_ESCAPES = 128; |
|
153 | 153 | |
154 | 154 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_dir_in_create |
155 | - const NO_DIR_IN_CREATE = 256; |
|
155 | + const NO_DIR_IN_CREATE = 256; |
|
156 | 156 | |
157 | 157 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_dir_in_create |
158 | - const NO_ENGINE_SUBSTITUTION = 512; |
|
158 | + const NO_ENGINE_SUBSTITUTION = 512; |
|
159 | 159 | |
160 | 160 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_field_options |
161 | - const NO_FIELD_OPTIONS = 1024; |
|
161 | + const NO_FIELD_OPTIONS = 1024; |
|
162 | 162 | |
163 | 163 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_key_options |
164 | - const NO_KEY_OPTIONS = 2048; |
|
164 | + const NO_KEY_OPTIONS = 2048; |
|
165 | 165 | |
166 | 166 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_table_options |
167 | - const NO_TABLE_OPTIONS = 4096; |
|
167 | + const NO_TABLE_OPTIONS = 4096; |
|
168 | 168 | |
169 | 169 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_unsigned_subtraction |
170 | - const NO_UNSIGNED_SUBTRACTION = 8192; |
|
170 | + const NO_UNSIGNED_SUBTRACTION = 8192; |
|
171 | 171 | |
172 | 172 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_zero_date |
173 | - const NO_ZERO_DATE = 16384; |
|
173 | + const NO_ZERO_DATE = 16384; |
|
174 | 174 | |
175 | 175 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_no_zero_in_date |
176 | - const NO_ZERO_IN_DATE = 32768; |
|
176 | + const NO_ZERO_IN_DATE = 32768; |
|
177 | 177 | |
178 | 178 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_only_full_group_by |
179 | - const ONLY_FULL_GROUP_BY = 65536; |
|
179 | + const ONLY_FULL_GROUP_BY = 65536; |
|
180 | 180 | |
181 | 181 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_pipes_as_concat |
182 | - const PIPES_AS_CONCAT = 131072; |
|
182 | + const PIPES_AS_CONCAT = 131072; |
|
183 | 183 | |
184 | 184 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_real_as_float |
185 | - const REAL_AS_FLOAT = 262144; |
|
185 | + const REAL_AS_FLOAT = 262144; |
|
186 | 186 | |
187 | 187 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_strict_all_tables |
188 | - const STRICT_ALL_TABLES = 524288; |
|
188 | + const STRICT_ALL_TABLES = 524288; |
|
189 | 189 | |
190 | 190 | // https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sqlmode_strict_trans_tables |
191 | 191 | const STRICT_TRANS_TABLES = 1048576; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | // The table and column names and any other field that must be escaped will |
196 | 196 | // not be. |
197 | 197 | // Reserved keywords are being escaped regardless this mode is used or not. |
198 | - const NO_ENCLOSING_QUOTES = 1073741824; |
|
198 | + const NO_ENCLOSING_QUOTES = 1073741824; |
|
199 | 199 | |
200 | 200 | /* |
201 | 201 | * Combination SQL Modes |
@@ -203,31 +203,31 @@ discard block |
||
203 | 203 | */ |
204 | 204 | |
205 | 205 | // REAL_AS_FLOAT, PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE |
206 | - const SQL_MODE_ANSI = 393234; |
|
206 | + const SQL_MODE_ANSI = 393234; |
|
207 | 207 | |
208 | 208 | // PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, |
209 | 209 | // NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, |
210 | - const SQL_MODE_DB2 = 138258; |
|
210 | + const SQL_MODE_DB2 = 138258; |
|
211 | 211 | |
212 | 212 | // PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, |
213 | 213 | // NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER |
214 | - const SQL_MODE_MAXDB = 138290; |
|
214 | + const SQL_MODE_MAXDB = 138290; |
|
215 | 215 | |
216 | 216 | // PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, |
217 | 217 | // NO_TABLE_OPTIONS, NO_FIELD_OPTIONS |
218 | - const SQL_MODE_MSSQL = 138258; |
|
218 | + const SQL_MODE_MSSQL = 138258; |
|
219 | 219 | |
220 | 220 | // PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, |
221 | 221 | // NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER |
222 | - const SQL_MODE_ORACLE = 138290; |
|
222 | + const SQL_MODE_ORACLE = 138290; |
|
223 | 223 | |
224 | 224 | // PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, |
225 | 225 | // NO_TABLE_OPTIONS, NO_FIELD_OPTIONS |
226 | - const SQL_MODE_POSTGRESQL = 138258; |
|
226 | + const SQL_MODE_POSTGRESQL = 138258; |
|
227 | 227 | |
228 | 228 | // STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, |
229 | 229 | // ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER |
230 | - const SQL_MODE_TRADITIONAL = 1622052; |
|
230 | + const SQL_MODE_TRADITIONAL = 1622052; |
|
231 | 231 | |
232 | 232 | // ------------------------------------------------------------------------- |
233 | 233 | // Keyword. |
@@ -431,11 +431,11 @@ discard block |
||
431 | 431 | } |
432 | 432 | if ($context[0] !== '\\') { |
433 | 433 | // Short context name (must be formatted into class name). |
434 | - $context = self::$contextPrefix . $context; |
|
434 | + $context = self::$contextPrefix.$context; |
|
435 | 435 | } |
436 | 436 | if (!class_exists($context)) { |
437 | 437 | throw new \Exception( |
438 | - 'Specified context ("' . $context . '") does not exist.' |
|
438 | + 'Specified context ("'.$context.'") does not exist.' |
|
439 | 439 | ); |
440 | 440 | } |
441 | 441 | self::$loadedContext = $context; |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | } |
507 | 507 | $mode = explode(',', $mode); |
508 | 508 | foreach ($mode as $m) { |
509 | - static::$MODE |= constant('static::' . $m); |
|
509 | + static::$MODE |= constant('static::'.$m); |
|
510 | 510 | } |
511 | 511 | } |
512 | 512 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | $quote = '"'; |
538 | 538 | } |
539 | 539 | |
540 | - return $quote . str_replace($quote, $quote . $quote, $str) . $quote; |
|
540 | + return $quote.str_replace($quote, $quote.$quote, $str).$quote; |
|
541 | 541 | } |
542 | 542 | } |
543 | 543 |