@@ -236,23 +236,23 @@ |
||
236 | 236 | { |
237 | 237 | if ($component->dest instanceof Expression) { |
238 | 238 | $columns = !empty($component->columns) ? |
239 | - '(`'.implode('`, `', $component->columns).'`)' : ''; |
|
239 | + '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
240 | 240 | |
241 | - return $component->dest.$columns; |
|
241 | + return $component->dest . $columns; |
|
242 | 242 | } elseif (isset($component->values)) { |
243 | 243 | return ExpressionArray::build($component->values); |
244 | 244 | } else { |
245 | - $ret = 'OUTFILE "'.$component->dest.'"'; |
|
245 | + $ret = 'OUTFILE "' . $component->dest . '"'; |
|
246 | 246 | |
247 | 247 | $fields_options_str = OptionsArray::build($component->fields_options); |
248 | 248 | if (trim($fields_options_str) !== '') { |
249 | 249 | $ret .= ($component->fields_keyword) ? ' FIELDS' : ' COLUMNS'; |
250 | - $ret .= ' '.$fields_options_str; |
|
250 | + $ret .= ' ' . $fields_options_str; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | $lines_options_str = OptionsArray::build($component->lines_options, array('expr' => true)); |
254 | 254 | if (trim($lines_options_str) !== '') { |
255 | - $ret .= ' LINES '.$lines_options_str; |
|
255 | + $ret .= ' LINES ' . $lines_options_str; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | return $ret; |
@@ -142,15 +142,15 @@ |
||
142 | 142 | public static function build($component, array $options = array()) |
143 | 143 | { |
144 | 144 | if (is_array($component)) { |
145 | - return '('.implode(', ', $component).')'; |
|
145 | + return '(' . implode(', ', $component) . ')'; |
|
146 | 146 | } else { |
147 | 147 | $tmp = ''; |
148 | 148 | if (!empty($component->inOut)) { |
149 | - $tmp .= $component->inOut.' '; |
|
149 | + $tmp .= $component->inOut . ' '; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | return trim( |
153 | - $tmp.Context::escape($component->name).' '.$component->type |
|
153 | + $tmp . Context::escape($component->name) . ' ' . $component->type |
|
154 | 154 | ); |
155 | 155 | } |
156 | 156 | } |
@@ -184,21 +184,21 @@ |
||
184 | 184 | */ |
185 | 185 | public static function build($component, array $options = array()) |
186 | 186 | { |
187 | - $ret = $component->type.' '; |
|
187 | + $ret = $component->type . ' '; |
|
188 | 188 | if (!empty($component->name)) { |
189 | - $ret .= Context::escape($component->name).' '; |
|
189 | + $ret .= Context::escape($component->name) . ' '; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | $columns = array(); |
193 | 193 | foreach ($component->columns as $column) { |
194 | 194 | $tmp = Context::escape($column['name']); |
195 | 195 | if (isset($column['length'])) { |
196 | - $tmp .= '('.$column['length'].')'; |
|
196 | + $tmp .= '(' . $column['length'] . ')'; |
|
197 | 197 | } |
198 | 198 | $columns[] = $tmp; |
199 | 199 | } |
200 | 200 | |
201 | - $ret .= '('.implode(',', $columns).') '.$component->options; |
|
201 | + $ret .= '(' . implode(',', $columns) . ') ' . $component->options; |
|
202 | 202 | |
203 | 203 | return trim($ret); |
204 | 204 | } |
@@ -123,6 +123,6 @@ |
||
123 | 123 | */ |
124 | 124 | public static function build($component, array $options = array()) |
125 | 125 | { |
126 | - return $component->offset.', '.$component->rowCount; |
|
126 | + return $component->offset . ', ' . $component->rowCount; |
|
127 | 127 | } |
128 | 128 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | if (is_array($component)) { |
129 | 129 | return implode(', ', $component); |
130 | 130 | } else { |
131 | - return $component->column.' = '.$component->value; |
|
131 | + return $component->column . ' = ' . $component->value; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } |
@@ -164,7 +164,7 @@ |
||
164 | 164 | if (is_array($component)) { |
165 | 165 | return implode(', ', $component); |
166 | 166 | } else { |
167 | - return $component->old.' TO '.$component->new; |
|
167 | + return $component->old . ' TO ' . $component->new; |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | } |
@@ -435,7 +435,7 @@ |
||
435 | 435 | } |
436 | 436 | |
437 | 437 | if (!empty($component->alias)) { |
438 | - $ret .= ' AS '.Context::escape($component->alias); |
|
438 | + $ret .= ' AS ' . Context::escape($component->alias); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | return $ret; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | || ($token->type === Token::TYPE_COMMENT) |
104 | 104 | ) { |
105 | 105 | $lastRaw .= $token->token; |
106 | - $lastValue = trim($lastValue).' '; |
|
106 | + $lastValue = trim($lastValue) . ' '; |
|
107 | 107 | continue; |
108 | 108 | } |
109 | 109 | |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | if (is_array($component)) { |
182 | 182 | return implode(', ', $component); |
183 | 183 | } elseif (!empty($component->raw)) { |
184 | - return '('.implode(', ', $component->raw).')'; |
|
184 | + return '(' . implode(', ', $component->raw) . ')'; |
|
185 | 185 | } else { |
186 | - return '('.implode(', ', $component->values).')'; |
|
186 | + return '(' . implode(', ', $component->values) . ')'; |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | public static function build($component, array $options = array()) |
303 | 303 | { |
304 | 304 | if (is_array($component)) { |
305 | - return "(\n ".implode(",\n ", $component)."\n)"; |
|
305 | + return "(\n " . implode(",\n ", $component) . "\n)"; |
|
306 | 306 | } else { |
307 | 307 | $tmp = ''; |
308 | 308 | |
@@ -311,22 +311,22 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | if ((isset($component->name)) && ($component->name !== '')) { |
314 | - $tmp .= Context::escape($component->name).' '; |
|
314 | + $tmp .= Context::escape($component->name) . ' '; |
|
315 | 315 | } |
316 | 316 | |
317 | 317 | if (!empty($component->type)) { |
318 | 318 | $tmp .= DataType::build( |
319 | 319 | $component->type, |
320 | 320 | array('lowercase' => true) |
321 | - ).' '; |
|
321 | + ) . ' '; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | if (!empty($component->key)) { |
325 | - $tmp .= $component->key.' '; |
|
325 | + $tmp .= $component->key . ' '; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | if (!empty($component->references)) { |
329 | - $tmp .= 'REFERENCES '.$component->references.' '; |
|
329 | + $tmp .= 'REFERENCES ' . $component->references . ' '; |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | $tmp .= $component->options; |