Skip to content

Commit 26230c7

Browse files
committed
Remove LSB for class constants
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent 327b6ac commit 26230c7

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

src/Utils/BufferedQuery.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,39 +185,39 @@ public function extract($end = false)
185185
* treated differently, because of the preceding backslash, it will
186186
* be ignored.
187187
*/
188-
if ((($this->status & static::STATUS_COMMENT) === 0) && ($this->query[$i] === '\\')) {
188+
if ((($this->status & self::STATUS_COMMENT) === 0) && ($this->query[$i] === '\\')) {
189189
$this->current .= $this->query[$i] . $this->query[++$i];
190190
continue;
191191
}
192192

193193
/*
194194
* Handling special parses statuses.
195195
*/
196-
if ($this->status === static::STATUS_STRING_SINGLE_QUOTES) {
196+
if ($this->status === self::STATUS_STRING_SINGLE_QUOTES) {
197197
// Single-quoted strings like 'foo'.
198198
if ($this->query[$i] === '\'') {
199199
$this->status = 0;
200200
}
201201

202202
$this->current .= $this->query[$i];
203203
continue;
204-
} elseif ($this->status === static::STATUS_STRING_DOUBLE_QUOTES) {
204+
} elseif ($this->status === self::STATUS_STRING_DOUBLE_QUOTES) {
205205
// Double-quoted strings like "bar".
206206
if ($this->query[$i] === '"') {
207207
$this->status = 0;
208208
}
209209

210210
$this->current .= $this->query[$i];
211211
continue;
212-
} elseif ($this->status === static::STATUS_STRING_BACKTICK) {
212+
} elseif ($this->status === self::STATUS_STRING_BACKTICK) {
213213
if ($this->query[$i] === '`') {
214214
$this->status = 0;
215215
}
216216

217217
$this->current .= $this->query[$i];
218218
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)
221221
) {
222222
// Bash-like (#) or SQL-like (-- ) comments end in new line.
223223
if ($this->query[$i] === "\n") {
@@ -226,7 +226,7 @@ public function extract($end = false)
226226

227227
$this->current .= $this->query[$i];
228228
continue;
229-
} elseif ($this->status === static::STATUS_COMMENT_C) {
229+
} elseif ($this->status === self::STATUS_COMMENT_C) {
230230
// C-like comments end in */.
231231
if (($this->query[$i - 1] === '*') && ($this->query[$i] === '/')) {
232232
$this->status = 0;
@@ -240,15 +240,15 @@ public function extract($end = false)
240240
* Checking if a string started.
241241
*/
242242
if ($this->query[$i] === '\'') {
243-
$this->status = static::STATUS_STRING_SINGLE_QUOTES;
243+
$this->status = self::STATUS_STRING_SINGLE_QUOTES;
244244
$this->current .= $this->query[$i];
245245
continue;
246246
} elseif ($this->query[$i] === '"') {
247-
$this->status = static::STATUS_STRING_DOUBLE_QUOTES;
247+
$this->status = self::STATUS_STRING_DOUBLE_QUOTES;
248248
$this->current .= $this->query[$i];
249249
continue;
250250
} elseif ($this->query[$i] === '`') {
251-
$this->status = static::STATUS_STRING_BACKTICK;
251+
$this->status = self::STATUS_STRING_BACKTICK;
252252
$this->current .= $this->query[$i];
253253
continue;
254254
}
@@ -257,20 +257,20 @@ public function extract($end = false)
257257
* Checking if a comment started.
258258
*/
259259
if ($this->query[$i] === '#') {
260-
$this->status = static::STATUS_COMMENT_BASH;
260+
$this->status = self::STATUS_COMMENT_BASH;
261261
$this->current .= $this->query[$i];
262262
continue;
263263
} elseif ($i + 2 < $len) {
264264
if (($this->query[$i] === '-')
265265
&& ($this->query[$i + 1] === '-')
266266
&& Context::isWhitespace($this->query[$i + 2])) {
267-
$this->status = static::STATUS_COMMENT_SQL;
267+
$this->status = self::STATUS_COMMENT_SQL;
268268
$this->current .= $this->query[$i];
269269
continue;
270270
} elseif (($this->query[$i] === '/')
271271
&& ($this->query[$i + 1] === '*')
272272
&& ($this->query[$i + 2] !== '!')) {
273-
$this->status = static::STATUS_COMMENT_C;
273+
$this->status = self::STATUS_COMMENT_C;
274274
$this->current .= $this->query[$i];
275275
continue;
276276
}

tests/Misc/UtfStringTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ class UtfStringTest extends TestCase
2525

2626
public function testArrayAccess()
2727
{
28-
$str = new UtfString(static::TEST_PHRASE);
28+
$str = new UtfString(self::TEST_PHRASE);
2929

3030
// offsetExists
31-
$this->assertArrayHasKey(static::TEST_PHRASE_LEN - 1, $str);
31+
$this->assertArrayHasKey(self::TEST_PHRASE_LEN - 1, $str);
3232
$this->assertArrayNotHasKey(-1, $str);
33-
$this->assertArrayNotHasKey(static::TEST_PHRASE_LEN, $str);
33+
$this->assertArrayNotHasKey(self::TEST_PHRASE_LEN, $str);
3434

3535
// offsetGet
36-
$this->assertEquals('.', $str[static::TEST_PHRASE_LEN - 1]);
36+
$this->assertEquals('.', $str[self::TEST_PHRASE_LEN - 1]);
3737
$this->assertNull($str[-1]);
38-
$this->assertNull($str[static::TEST_PHRASE_LEN]);
38+
$this->assertNull($str[self::TEST_PHRASE_LEN]);
3939
}
4040

4141
public function testSet()
@@ -77,8 +77,8 @@ public function testGetCharLength()
7777

7878
public function testToString()
7979
{
80-
$str = new UtfString(static::TEST_PHRASE);
81-
$this->assertEquals(static::TEST_PHRASE, (string) $str);
80+
$str = new UtfString(self::TEST_PHRASE);
81+
$this->assertEquals(self::TEST_PHRASE, (string) $str);
8282
}
8383

8484
/**

tools/ContextGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public static function generate($options)
238238
}
239239

240240
return sprintf(
241-
static::TEMPLATE,
241+
self::TEMPLATE,
242242
$options['name'],
243243
$options['class'],
244244
$options['link'],

0 commit comments

Comments
 (0)