Selaa lähdekoodia

Whitespace fixes

rpm
J. King 4 vuotta sitten
vanhempi
commit
c59cdfef76
  1. 2
      lib/Db/AbstractStatement.php
  2. 2
      lib/Misc/URL.php
  3. 2
      tests/cases/Misc/TestValueInfo.php
  4. 4
      tests/lib/AbstractTest.php

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

2
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

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

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

Ladataan…
Peruuta
Tallenna