@@ -195,11 +195,11 @@ |
||
195 | 195 | { |
196 | 196 | $ret = array(); |
197 | 197 | foreach ($component as $c) { |
198 | - $ret[] = array_search($c->type, static::$JOINS).' '.$c->expr |
|
198 | + $ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr |
|
199 | 199 | .(!empty($c->on) |
200 | - ? ' ON '.Condition::build($c->on) : '') |
|
200 | + ? ' ON ' . Condition::build($c->on) : '') |
|
201 | 201 | .(!empty($c->using) |
202 | - ? ' USING '.ArrayObj::build($c->using) : ''); |
|
202 | + ? ' USING ' . ArrayObj::build($c->using) : ''); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | return implode(' ', $ret); |
@@ -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 | } |