@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public static function getForeignKeys($statement) |
28 | 28 | { |
29 | - if (empty($statement->fields) || (! is_array($statement->fields)) || (! $statement->options->has('TABLE'))) { |
|
29 | + if (empty($statement->fields) || (!is_array($statement->fields)) || (!$statement->options->has('TABLE'))) { |
|
30 | 30 | return []; |
31 | 31 | } |
32 | 32 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | $columns = []; |
41 | 41 | foreach ($field->key->columns as $column) { |
42 | - if (! isset($column['name'])) { |
|
42 | + if (!isset($column['name'])) { |
|
43 | 43 | continue; |
44 | 44 | } |
45 | 45 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'index_list' => $columns, |
52 | 52 | ]; |
53 | 53 | |
54 | - if (! empty($field->references)) { |
|
54 | + if (!empty($field->references)) { |
|
55 | 55 | $tmp['ref_db_name'] = $field->references->table->database; |
56 | 56 | $tmp['ref_table_name'] = $field->references->table->table; |
57 | 57 | $tmp['ref_index_list'] = $field->references->columns; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public static function getFields($statement) |
86 | 86 | { |
87 | - if (empty($statement->fields) || (! is_array($statement->fields)) || (! $statement->options->has('TABLE'))) { |
|
87 | + if (empty($statement->fields) || (!is_array($statement->fields)) || (!$statement->options->has('TABLE'))) { |
|
88 | 88 | return []; |
89 | 89 | } |
90 | 90 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'timestamp_not_null' => false, |
102 | 102 | ]; |
103 | 103 | |
104 | - if (! $field->options) { |
|
104 | + if (!$field->options) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | $option = $field->options->has('AS'); |
130 | 130 | |
131 | - if (! $option) { |
|
131 | + if (!$option) { |
|
132 | 132 | continue; |
133 | 133 | } |
134 | 134 |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | } elseif ($state === 1) { |
164 | 164 | if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) { |
165 | 165 | $positionBeforeSearch = $list->idx; |
166 | - $list->idx++;// Ignore the current token "(" or the search condition will always be true |
|
166 | + $list->idx++; // Ignore the current token "(" or the search condition will always be true |
|
167 | 167 | $nextToken = $list->getNext(); |
168 | - $list->idx = $positionBeforeSearch;// Restore the position |
|
168 | + $list->idx = $positionBeforeSearch; // Restore the position |
|
169 | 169 | |
170 | 170 | if ($nextToken !== null && $nextToken->value === '(') { |
171 | 171 | // Switch to expression mode |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $state = 3; |
183 | 183 | } elseif (($token->value === ',') || ($token->value === ')')) { |
184 | 184 | $state = $token->value === ',' ? 2 : 4; |
185 | - if (! empty($lastColumn)) { |
|
185 | + if (!empty($lastColumn)) { |
|
186 | 186 | $ret->columns[] = $lastColumn; |
187 | 187 | $lastColumn = []; |
188 | 188 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | if ($token->type === Token::TYPE_OPERATOR) { |
215 | 215 | // This got back to here and we reached the end of the expression |
216 | 216 | if ($token->value === ')') { |
217 | - $state = 4;// go back to state 4 to fetch options |
|
217 | + $state = 4; // go back to state 4 to fetch options |
|
218 | 218 | continue; |
219 | 219 | } |
220 | 220 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | public static function build($component, array $options = []) |
257 | 257 | { |
258 | 258 | $ret = $component->type . ' '; |
259 | - if (! empty($component->name)) { |
|
259 | + if (!empty($component->name)) { |
|
260 | 260 | $ret .= Context::escape($component->name) . ' '; |
261 | 261 | } |
262 | 262 |