From c59cdfef76771c50226210461efb7ea3db4c0c97 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 25 Oct 2019 15:16:35 -0400 Subject: [PATCH] Whitespace fixes --- lib/Db/AbstractStatement.php | 2 +- lib/Misc/URL.php | 2 +- tests/cases/Misc/TestValueInfo.php | 2 +- tests/lib/AbstractTest.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Db/AbstractStatement.php b/lib/Db/AbstractStatement.php index 8471986..45b6801 100644 --- a/lib/Db/AbstractStatement.php +++ b/lib/Db/AbstractStatement.php @@ -71,7 +71,7 @@ abstract class AbstractStatement implements Statement { } protected function bindValues(array $values): bool { - // recursively flatten any arrays, which may be provided for SET or IN() clauses + // recursively flatten any arrays, which may be provided for SET or IN() clauses $values = ValueInfo::flatten($values); foreach ($values as $a => $value) { if (array_key_exists($a, $this->types)) { diff --git a/lib/Misc/URL.php b/lib/Misc/URL.php index da49eff..4a4459c 100644 --- a/lib/Misc/URL.php +++ b/lib/Misc/URL.php @@ -145,7 +145,7 @@ class URL { } /** Appends data to a URL's query component - * + * * @param string $url The input URL * @param string $data The data to append. This should already be escaped where necessary and not start with any delimiter * @param string $glue The query subcomponent delimiter, usually "&". If the URL has no query, "?" will be prepended instead diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index 83053c5..2d5ffc4 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -642,7 +642,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { public function testFlattenArray() { $arr = [1, [2, 3, [4, 5]], 6, [[7, 8], 9, 10]]; - $exp = range(1,10); + $exp = range(1, 10); $this->assertSame($exp, I::flatten($arr)); } } diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index a2e66a3..f3a1ffb 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -74,7 +74,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { if (isset($params)) { if (is_array($params)) { $params = implode("&", array_map(function($v, $k) { - return rawurlencode($k).(isset($v) ? "=".rawurlencode($v) : ""); + return rawurlencode($k).(isset($v) ? "=".rawurlencode($v) : ""); }, $params, array_keys($params))); } $url = URL::queryAppend($url, (string) $params); @@ -90,7 +90,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { if (is_string($body) && in_array(strtolower($type), ["", "application/x-www-form-urlencoded"])) { parse_str($body, $parsedBody); } elseif (!is_string($body) && in_array(strtolower($type), ["application/json", "text/json"])) { - $body = json_encode($body, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE); + $body = json_encode($body, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE); } elseif (!is_string($body) && in_array(strtolower($type), ["", "application/x-www-form-urlencoded"])) { $parsedBody = $body; $body = http_build_query($body, "a", "&");