@@ -185,39 +185,39 @@ public function extract($end = false)
185
185
* treated differently, because of the preceding backslash, it will
186
186
* be ignored.
187
187
*/
188
- if ((($ this ->status & static ::STATUS_COMMENT ) === 0 ) && ($ this ->query [$ i ] === '\\' )) {
188
+ if ((($ this ->status & self ::STATUS_COMMENT ) === 0 ) && ($ this ->query [$ i ] === '\\' )) {
189
189
$ this ->current .= $ this ->query [$ i ] . $ this ->query [++$ i ];
190
190
continue ;
191
191
}
192
192
193
193
/*
194
194
* Handling special parses statuses.
195
195
*/
196
- if ($ this ->status === static ::STATUS_STRING_SINGLE_QUOTES ) {
196
+ if ($ this ->status === self ::STATUS_STRING_SINGLE_QUOTES ) {
197
197
// Single-quoted strings like 'foo'.
198
198
if ($ this ->query [$ i ] === '\'' ) {
199
199
$ this ->status = 0 ;
200
200
}
201
201
202
202
$ this ->current .= $ this ->query [$ i ];
203
203
continue ;
204
- } elseif ($ this ->status === static ::STATUS_STRING_DOUBLE_QUOTES ) {
204
+ } elseif ($ this ->status === self ::STATUS_STRING_DOUBLE_QUOTES ) {
205
205
// Double-quoted strings like "bar".
206
206
if ($ this ->query [$ i ] === '" ' ) {
207
207
$ this ->status = 0 ;
208
208
}
209
209
210
210
$ this ->current .= $ this ->query [$ i ];
211
211
continue ;
212
- } elseif ($ this ->status === static ::STATUS_STRING_BACKTICK ) {
212
+ } elseif ($ this ->status === self ::STATUS_STRING_BACKTICK ) {
213
213
if ($ this ->query [$ i ] === '` ' ) {
214
214
$ this ->status = 0 ;
215
215
}
216
216
217
217
$ this ->current .= $ this ->query [$ i ];
218
218
continue ;
219
- } elseif (($ this ->status === static ::STATUS_COMMENT_BASH )
220
- || ($ this ->status === static ::STATUS_COMMENT_SQL )
219
+ } elseif (($ this ->status === self ::STATUS_COMMENT_BASH )
220
+ || ($ this ->status === self ::STATUS_COMMENT_SQL )
221
221
) {
222
222
// Bash-like (#) or SQL-like (-- ) comments end in new line.
223
223
if ($ this ->query [$ i ] === "\n" ) {
@@ -226,7 +226,7 @@ public function extract($end = false)
226
226
227
227
$ this ->current .= $ this ->query [$ i ];
228
228
continue ;
229
- } elseif ($ this ->status === static ::STATUS_COMMENT_C ) {
229
+ } elseif ($ this ->status === self ::STATUS_COMMENT_C ) {
230
230
// C-like comments end in */.
231
231
if (($ this ->query [$ i - 1 ] === '* ' ) && ($ this ->query [$ i ] === '/ ' )) {
232
232
$ this ->status = 0 ;
@@ -240,15 +240,15 @@ public function extract($end = false)
240
240
* Checking if a string started.
241
241
*/
242
242
if ($ this ->query [$ i ] === '\'' ) {
243
- $ this ->status = static ::STATUS_STRING_SINGLE_QUOTES ;
243
+ $ this ->status = self ::STATUS_STRING_SINGLE_QUOTES ;
244
244
$ this ->current .= $ this ->query [$ i ];
245
245
continue ;
246
246
} elseif ($ this ->query [$ i ] === '" ' ) {
247
- $ this ->status = static ::STATUS_STRING_DOUBLE_QUOTES ;
247
+ $ this ->status = self ::STATUS_STRING_DOUBLE_QUOTES ;
248
248
$ this ->current .= $ this ->query [$ i ];
249
249
continue ;
250
250
} elseif ($ this ->query [$ i ] === '` ' ) {
251
- $ this ->status = static ::STATUS_STRING_BACKTICK ;
251
+ $ this ->status = self ::STATUS_STRING_BACKTICK ;
252
252
$ this ->current .= $ this ->query [$ i ];
253
253
continue ;
254
254
}
@@ -257,20 +257,20 @@ public function extract($end = false)
257
257
* Checking if a comment started.
258
258
*/
259
259
if ($ this ->query [$ i ] === '# ' ) {
260
- $ this ->status = static ::STATUS_COMMENT_BASH ;
260
+ $ this ->status = self ::STATUS_COMMENT_BASH ;
261
261
$ this ->current .= $ this ->query [$ i ];
262
262
continue ;
263
263
} elseif ($ i + 2 < $ len ) {
264
264
if (($ this ->query [$ i ] === '- ' )
265
265
&& ($ this ->query [$ i + 1 ] === '- ' )
266
266
&& Context::isWhitespace ($ this ->query [$ i + 2 ])) {
267
- $ this ->status = static ::STATUS_COMMENT_SQL ;
267
+ $ this ->status = self ::STATUS_COMMENT_SQL ;
268
268
$ this ->current .= $ this ->query [$ i ];
269
269
continue ;
270
270
} elseif (($ this ->query [$ i ] === '/ ' )
271
271
&& ($ this ->query [$ i + 1 ] === '* ' )
272
272
&& ($ this ->query [$ i + 2 ] !== '! ' )) {
273
- $ this ->status = static ::STATUS_COMMENT_C ;
273
+ $ this ->status = self ::STATUS_COMMENT_C ;
274
274
$ this ->current .= $ this ->query [$ i ];
275
275
continue ;
276
276
}
0 commit comments