File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 12
12
use PhpMyAdmin \SqlParser \TokensList ;
13
13
14
14
use function array_slice ;
15
- use function count ;
16
15
use function is_int ;
17
16
18
17
/** KILL [HARD|SOFT]
@@ -119,7 +118,7 @@ public function parse(Parser $parser, TokensList $list): void
119
118
if ($ token ->type === Token::TYPE_KEYWORD && $ token ->value === 'SELECT ' ) {
120
119
$ subList = new TokensList (array_slice ($ list ->tokens , $ list ->idx - 1 ));
121
120
$ subParser = new Parser ($ subList );
122
- if (count ( $ subParser ->errors ) ) {
121
+ if ($ subParser ->errors !== [] ) {
123
122
foreach ($ subParser ->errors as $ error ) {
124
123
$ parser ->errors [] = $ error ;
125
124
}
@@ -158,19 +157,15 @@ public function build()
158
157
{
159
158
$ ret = 'KILL ' ;
160
159
161
- if ($ this ->options && count ( $ this ->options ->options ) > 0 ) {
160
+ if ($ this ->options !== null && $ this ->options ->options !== [] ) {
162
161
$ ret .= ' ' . OptionsArray::build ($ this ->options );
163
162
}
164
163
165
164
if ($ this ->IDKeywordUsed ) {
166
165
$ ret .= ' ID ' ;
167
166
}
168
167
169
- $ builtIdentifier = (string ) $ this ->identifier ;
170
- if ($ this ->identifier instanceof Statement) {
171
- $ builtIdentifier = $ this ->identifier ->build ();
172
- }
173
-
168
+ $ builtIdentifier = $ this ->identifier ;
174
169
if ($ this ->parenthesisUsed ) {
175
170
$ ret .= ' ( ' . $ builtIdentifier . ') ' ;
176
171
} elseif ($ this ->identifier !== null ) {
You can’t perform that action at this time.
0 commit comments