mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Whitespace fixes
This commit is contained in:
parent
71c7cd8fb1
commit
c59cdfef76
4 changed files with 5 additions and 5 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue