1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Style fixes

This commit is contained in:
J. King 2020-11-16 10:26:14 -05:00
parent 180b4ecc9b
commit e16df90bae
13 changed files with 50 additions and 57 deletions

View file

@ -325,7 +325,6 @@ class Database {
return false;
}
return (bool) $this->db->prepare("UPDATE arsse_users set $setClause where id = ?", $setTypes, "str")->run($setValues, $user)->changes();
}
/** Creates a new session for the given user and returns the session identifier */

View file

@ -13,7 +13,7 @@ class PDOResult extends \JKingWeb\Arsse\Db\PDOResult {
public function valid() {
$this->cur = $this->set->fetch(\PDO::FETCH_ASSOC);
if ($this->cur !== false) {
foreach($this->cur as $k => $v) {
foreach ($this->cur as $k => $v) {
if (is_resource($v)) {
$this->cur[$k] = stream_get_contents($v);
fclose($v);

View file

@ -48,7 +48,7 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult {
public function valid() {
$this->cur = pg_fetch_row($this->r, null, \PGSQL_ASSOC);
if ($this->cur !== false) {
foreach($this->blobs as $f) {
foreach ($this->blobs as $f) {
if ($this->cur[$f]) {
$this->cur[$f] = hex2bin(substr($this->cur[$f], 2));
}

View file

@ -7,19 +7,14 @@ declare(strict_types=1);
namespace JKingWeb\Arsse\REST\Miniflux;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Service;
use JKingWeb\Arsse\Context\Context;
use JKingWeb\Arsse\Misc\ValueInfo;
use JKingWeb\Arsse\AbstractException;
use JKingWeb\Arsse\Db\ExceptionInput;
use JKingWeb\Arsse\Feed\Exception as FeedException;
use JKingWeb\Arsse\Misc\HTTP;
use JKingWeb\Arsse\REST\Exception;
use JKingWeb\Arsse\REST\Exception404;
use JKingWeb\Arsse\REST\Exception405;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Laminas\Diactoros\Response\JsonResponse as Response;
use Laminas\Diactoros\Response\EmptyResponse;
class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {

View file

@ -70,7 +70,6 @@ class User {
return $out;
}
public function remove(string $user): bool {
try {
$out = $this->u->userRemove($user);

View file

@ -139,7 +139,7 @@ trait SeriesUser {
public function testSetNoMetadata(): void {
$in = [
'num' => 2112,
'blah' => "bloo"
'blah' => "bloo",
];
$this->assertFalse(Arsse::$db->userPropertiesSet("john.doe@example.com", $in));
$state = $this->primeExpectations($this->data, ['arsse_users' => ['id', 'num', 'admin', 'lang', 'tz', 'sort_asc']]);

View file

@ -137,7 +137,8 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest {
public function testUpdateTo7(): void {
$this->drv->schemaUpdate(6);
$this->drv->exec(<<<QUERY_TEXT
$this->drv->exec(
<<<QUERY_TEXT
INSERT INTO arsse_users values('a', 'xyz');
INSERT INTO arsse_users values('b', 'abc');
INSERT INTO arsse_folders(owner,name) values('a', '1');

View file

@ -9,7 +9,6 @@ namespace JKingWeb\Arsse\TestCase\User;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Database;
use JKingWeb\Arsse\User;
use JKingWeb\Arsse\AbstractException as Exception;
use JKingWeb\Arsse\User\ExceptionConflict;
use JKingWeb\Arsse\User\ExceptionInput;
use JKingWeb\Arsse\User\Driver;

View file

@ -1,4 +1,4 @@
<?php return [
'mime' => "image/svg+xml",
'content' => '<svg xmlns="http://www.w3.org/2000/svg" width="900" height="600"><rect fill="#fff" height="600" width="900"/><circle fill="#bc002d" cx="450" cy="300" r="180"/></svg>'
'content' => '<svg xmlns="http://www.w3.org/2000/svg" width="900" height="600"><rect fill="#fff" height="600" width="900"/><circle fill="#bc002d" cx="450" cy="300" r="180"/></svg>',
];

View file

@ -1,4 +1,4 @@
<?php return [
'mime' => "image/svg+xml",
'content' => '<svg xmlns="http://www.w3.org/2000/svg" width="900" height="600"><rect width="900" height="600" fill="#ED2939"/><rect width="600" height="600" fill="#fff"/><rect width="300" height="600" fill="#002395"/></svg>'
'content' => '<svg xmlns="http://www.w3.org/2000/svg" width="900" height="600"><rect width="900" height="600" fill="#ED2939"/><rect width="600" height="600" fill="#fff"/><rect width="300" height="600" fill="#002395"/></svg>',
];