summaryrefslogtreecommitdiffstats
path: root/tests/Utils/BufferedQueryTest.php
diff options
context:
space:
mode:
authorBruno Perel <brunoperel@gmail.com>2018-11-26 19:56:17 +0100
committerBruno Perel <brunoperel@gmail.com>2018-11-26 20:08:52 +0100
commit513ed8175bdc0fc17a192ea29757cf8fee178c2a (patch)
treec87f72dcdc4d5f6f86e5da4d212e7be92cf9506c /tests/Utils/BufferedQueryTest.php
parent8e37bb398b9bf7449c6855f3e0639156cef35e7e (diff)
downloadsql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.zip
sql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.tar.gz
sql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.tar.bz2
Cleanup and improve readability:
Avoid duplicate if conditions Use switch/case instead of ifs when possible
Diffstat (limited to 'tests/Utils/BufferedQueryTest.php')
-rw-r--r--tests/Utils/BufferedQueryTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Utils/BufferedQueryTest.php b/tests/Utils/BufferedQueryTest.php
index 182c1ab..731fc0e 100644
--- a/tests/Utils/BufferedQueryTest.php
+++ b/tests/Utils/BufferedQueryTest.php
@@ -39,7 +39,7 @@ class BufferedQueryTest extends TestCase
// Feeding chunks and extracting queries.
$i = 0;
while ($i < $count) {
- if (($stmt = $bq->extract())) {
+ if ($stmt = $bq->extract()) {
$statements[] = $stmt;
} else {
$bq->query .= $chunks[$i++];
@@ -47,7 +47,7 @@ class BufferedQueryTest extends TestCase
}
// Feeding ended, extracting remaining queries.
- while (($stmt = $bq->extract(true))) {
+ while ($stmt = $bq->extract(true)) {
$statements[] = $stmt;
}