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
4f34b4ff29
commit
549c7bdc72
11 changed files with 18 additions and 25 deletions
|
@ -265,7 +265,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
|||
}
|
||||
}
|
||||
//normalize user-specific input
|
||||
foreach (self::USER_META_MAP as $k => [,$d,]) {
|
||||
foreach (self::USER_META_MAP as $k => [,$d]) {
|
||||
$t = gettype($d);
|
||||
if (!isset($body[$k])) {
|
||||
$body[$k] = null;
|
||||
|
@ -343,7 +343,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
|||
protected function editUser(string $user, array $data): array {
|
||||
// map Miniflux properties to internal metadata properties
|
||||
$in = [];
|
||||
foreach (self::USER_META_MAP as $i => [$o,,]) {
|
||||
foreach (self::USER_META_MAP as $i => [$o,]) {
|
||||
if (isset($data[$i])) {
|
||||
if ($i === "entry_sorting_direction") {
|
||||
$in[$o] = $data[$i] === "asc";
|
||||
|
|
|
@ -185,7 +185,7 @@ trait SeriesUser {
|
|||
$this->assertTrue(Arsse::$db->userRename("john.doe@example.com", "juan.doe@example.com"));
|
||||
$state = $this->primeExpectations($this->data, [
|
||||
'arsse_users' => ['id', 'num'],
|
||||
'arsse_user_meta' => ["owner", "key", "value"]
|
||||
'arsse_user_meta' => ["owner", "key", "value"],
|
||||
]);
|
||||
$state['arsse_users']['rows'][2][0] = "juan.doe@example.com";
|
||||
$state['arsse_user_meta']['rows'][6][0] = "juan.doe@example.com";
|
||||
|
|
|
@ -7,7 +7,6 @@ declare(strict_types=1);
|
|||
namespace JKingWeb\Arsse\TestCase\Misc;
|
||||
|
||||
use JKingWeb\Arsse\Rule\Rule;
|
||||
use JKingWeb\Arsse\Rule\Exception;
|
||||
|
||||
/** @covers \JKingWeb\Arsse\Rule\Rule */
|
||||
class TestRule extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||
|
@ -32,13 +31,8 @@ class TestRule extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
public function testApplyRules(string $keepRule, string $blockRule, string $title, array $categories, $exp): void {
|
||||
$keepRule = Rule::prep($keepRule);
|
||||
$blockRule = Rule::prep($blockRule);
|
||||
if ($exp instanceof \Exception) {
|
||||
$this->assertException($exp);
|
||||
Rule::apply($keepRule, $blockRule, $title, $categories);
|
||||
} else {
|
||||
$this->assertSame($exp, Rule::apply($keepRule, $blockRule, $title, $categories));
|
||||
}
|
||||
}
|
||||
|
||||
public function provideApplications(): iterable {
|
||||
return [
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace JKingWeb\Arsse\TestCase\User;
|
|||
use JKingWeb\Arsse\Arsse;
|
||||
use JKingWeb\Arsse\Database;
|
||||
use JKingWeb\Arsse\User\Driver as DriverInterface;
|
||||
use JKingWeb\Arsse\User\ExceptionConflict;
|
||||
use JKingWeb\Arsse\User\Internal\Driver;
|
||||
|
||||
/** @covers \JKingWeb\Arsse\User\Internal\Driver */
|
||||
|
|
Loading…
Reference in a new issue