Browse Source

Whitespace fixes

tags/0.8.1
J. King 1 month ago
parent
commit
c59cdfef76

+ 1
- 1
lib/Db/AbstractStatement.php View File

@@ -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)) {

+ 1
- 1
lib/Misc/URL.php View File

@@ -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

+ 1
- 1
tests/cases/Misc/TestValueInfo.php View File

@@ -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));
}
}

+ 2
- 2
tests/lib/AbstractTest.php View File

@@ -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", "&");

Loading…
Cancel
Save