mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Style fixes
This commit is contained in:
parent
180b4ecc9b
commit
e16df90bae
13 changed files with 50 additions and 57 deletions
|
@ -325,7 +325,6 @@ class Database {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return (bool) $this->db->prepare("UPDATE arsse_users set $setClause where id = ?", $setTypes, "str")->run($setValues, $user)->changes();
|
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 */
|
/** Creates a new session for the given user and returns the session identifier */
|
||||||
|
|
|
@ -13,7 +13,7 @@ class PDOResult extends \JKingWeb\Arsse\Db\PDOResult {
|
||||||
public function valid() {
|
public function valid() {
|
||||||
$this->cur = $this->set->fetch(\PDO::FETCH_ASSOC);
|
$this->cur = $this->set->fetch(\PDO::FETCH_ASSOC);
|
||||||
if ($this->cur !== false) {
|
if ($this->cur !== false) {
|
||||||
foreach($this->cur as $k => $v) {
|
foreach ($this->cur as $k => $v) {
|
||||||
if (is_resource($v)) {
|
if (is_resource($v)) {
|
||||||
$this->cur[$k] = stream_get_contents($v);
|
$this->cur[$k] = stream_get_contents($v);
|
||||||
fclose($v);
|
fclose($v);
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult {
|
||||||
public function valid() {
|
public function valid() {
|
||||||
$this->cur = pg_fetch_row($this->r, null, \PGSQL_ASSOC);
|
$this->cur = pg_fetch_row($this->r, null, \PGSQL_ASSOC);
|
||||||
if ($this->cur !== false) {
|
if ($this->cur !== false) {
|
||||||
foreach($this->blobs as $f) {
|
foreach ($this->blobs as $f) {
|
||||||
if ($this->cur[$f]) {
|
if ($this->cur[$f]) {
|
||||||
$this->cur[$f] = hex2bin(substr($this->cur[$f], 2));
|
$this->cur[$f] = hex2bin(substr($this->cur[$f], 2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,19 +7,14 @@ declare(strict_types=1);
|
||||||
namespace JKingWeb\Arsse\REST\Miniflux;
|
namespace JKingWeb\Arsse\REST\Miniflux;
|
||||||
|
|
||||||
use JKingWeb\Arsse\Arsse;
|
use JKingWeb\Arsse\Arsse;
|
||||||
use JKingWeb\Arsse\Service;
|
|
||||||
use JKingWeb\Arsse\Context\Context;
|
|
||||||
use JKingWeb\Arsse\Misc\ValueInfo;
|
use JKingWeb\Arsse\Misc\ValueInfo;
|
||||||
use JKingWeb\Arsse\AbstractException;
|
use JKingWeb\Arsse\AbstractException;
|
||||||
use JKingWeb\Arsse\Db\ExceptionInput;
|
|
||||||
use JKingWeb\Arsse\Feed\Exception as FeedException;
|
|
||||||
use JKingWeb\Arsse\Misc\HTTP;
|
use JKingWeb\Arsse\Misc\HTTP;
|
||||||
use JKingWeb\Arsse\REST\Exception;
|
use JKingWeb\Arsse\REST\Exception;
|
||||||
use JKingWeb\Arsse\REST\Exception404;
|
use JKingWeb\Arsse\REST\Exception404;
|
||||||
use JKingWeb\Arsse\REST\Exception405;
|
use JKingWeb\Arsse\REST\Exception405;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Laminas\Diactoros\Response\JsonResponse as Response;
|
|
||||||
use Laminas\Diactoros\Response\EmptyResponse;
|
use Laminas\Diactoros\Response\EmptyResponse;
|
||||||
|
|
||||||
class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
||||||
|
|
|
@ -70,7 +70,6 @@ class User {
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function remove(string $user): bool {
|
public function remove(string $user): bool {
|
||||||
try {
|
try {
|
||||||
$out = $this->u->userRemove($user);
|
$out = $this->u->userRemove($user);
|
||||||
|
|
|
@ -139,7 +139,7 @@ trait SeriesUser {
|
||||||
public function testSetNoMetadata(): void {
|
public function testSetNoMetadata(): void {
|
||||||
$in = [
|
$in = [
|
||||||
'num' => 2112,
|
'num' => 2112,
|
||||||
'blah' => "bloo"
|
'blah' => "bloo",
|
||||||
];
|
];
|
||||||
$this->assertFalse(Arsse::$db->userPropertiesSet("john.doe@example.com", $in));
|
$this->assertFalse(Arsse::$db->userPropertiesSet("john.doe@example.com", $in));
|
||||||
$state = $this->primeExpectations($this->data, ['arsse_users' => ['id', 'num', 'admin', 'lang', 'tz', 'sort_asc']]);
|
$state = $this->primeExpectations($this->data, ['arsse_users' => ['id', 'num', 'admin', 'lang', 'tz', 'sort_asc']]);
|
||||||
|
|
|
@ -137,7 +137,8 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
|
|
||||||
public function testUpdateTo7(): void {
|
public function testUpdateTo7(): void {
|
||||||
$this->drv->schemaUpdate(6);
|
$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('a', 'xyz');
|
||||||
INSERT INTO arsse_users values('b', 'abc');
|
INSERT INTO arsse_users values('b', 'abc');
|
||||||
INSERT INTO arsse_folders(owner,name) values('a', '1');
|
INSERT INTO arsse_folders(owner,name) values('a', '1');
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace JKingWeb\Arsse\TestCase\User;
|
||||||
use JKingWeb\Arsse\Arsse;
|
use JKingWeb\Arsse\Arsse;
|
||||||
use JKingWeb\Arsse\Database;
|
use JKingWeb\Arsse\Database;
|
||||||
use JKingWeb\Arsse\User;
|
use JKingWeb\Arsse\User;
|
||||||
use JKingWeb\Arsse\AbstractException as Exception;
|
|
||||||
use JKingWeb\Arsse\User\ExceptionConflict;
|
use JKingWeb\Arsse\User\ExceptionConflict;
|
||||||
use JKingWeb\Arsse\User\ExceptionInput;
|
use JKingWeb\Arsse\User\ExceptionInput;
|
||||||
use JKingWeb\Arsse\User\Driver;
|
use JKingWeb\Arsse\User\Driver;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php return [
|
<?php return [
|
||||||
'mime' => "image/svg+xml",
|
'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>',
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php return [
|
<?php return [
|
||||||
'mime' => "image/svg+xml",
|
'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>',
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue