Skip to content

Commit 3b27e60

Browse files
committed
Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent 2ed48d8 commit 3b27e60

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

src/Components/OptionsArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
228228

229229
$ret->options[$lastOptionId]['expr'] .= $token->token;
230230

231-
if (! ((($token->token === '(') && ($brackets === 1))
231+
if (! (($token->token === '(') && ($brackets === 1)
232232
|| (($token->token === ')') && ($brackets === 0)))
233233
) {
234234
// First pair of brackets is being skipped.

src/Statements/CreateStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ public function parse(Parser $parser, TokensList $list)
623623
// This is used instead of `++$brackets` because,
624624
// initially, `$brackets` is `false` cannot be
625625
// incremented.
626-
$brackets = $brackets + 1;
626+
$brackets += 1;
627627
} elseif ($token->value === ')') {
628628
--$brackets;
629629
}

src/Statements/LockStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function parse(Parser $parser, TokensList $list)
112112
$prevToken = $token;
113113
}
114114

115-
if ($state !== 2 && $prevToken != null) {
115+
if ($state !== 2 && $prevToken !== null) {
116116
$parser->error('Unexpected end of LOCK statement.', $prevToken);
117117
}
118118
}

src/Statements/PurgeStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function parse(Parser $parser, TokensList $list)
115115
}
116116

117117
// Only one possible end state
118-
if ($state != 4) {
118+
if ($state !== 4) {
119119
$parser->error('Unexpected token.', $prevToken);
120120
}
121121
}

src/Utils/BufferedQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public function extract($end = false)
322322

323323
// Checking if the delimiter definition ended.
324324
if (($delimiter !== '')
325-
&& ((($i < $len) && Context::isWhitespace($this->query[$i]))
325+
&& (($i < $len) && Context::isWhitespace($this->query[$i])
326326
|| (($i === $len) && $end))
327327
) {
328328
// Saving the delimiter.

tests/Utils/CLITest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,10 @@ public function testRunTokenizeStdIn($input, $getopt, $output, $result)
387387

388388
public function tokenizeParamsStdIn()
389389
{
390-
$result = (
391-
"[TOKEN 0]\nType = 1\nFlags = 3\nValue = 'SELECT'\nToken = 'SELECT'\n\n"
390+
$result = "[TOKEN 0]\nType = 1\nFlags = 3\nValue = 'SELECT'\nToken = 'SELECT'\n\n"
392391
. "[TOKEN 1]\nType = 3\nFlags = 0\nValue = ' '\nToken = ' '\n\n"
393392
. "[TOKEN 2]\nType = 6\nFlags = 0\nValue = 1\nToken = '1'\n\n"
394-
. "[TOKEN 3]\nType = 9\nFlags = 0\nValue = NULL\nToken = NULL\n\n"
395-
);
393+
. "[TOKEN 3]\nType = 9\nFlags = 0\nValue = NULL\nToken = NULL\n\n";
396394

397395
return [
398396
[

0 commit comments

Comments
 (0)