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:
parent
f2245861e3
commit
cf896121b2
27 changed files with 53 additions and 59 deletions
|
@ -17,6 +17,7 @@ $paths = [
|
|||
$rules = [
|
||||
'@PSR2' => true,
|
||||
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
|
||||
'function_declaration' => ['closure_function_spacing' => "none"],
|
||||
];
|
||||
|
||||
$finder = \PhpCsFixer\Finder::create();
|
||||
|
|
|
@ -855,7 +855,8 @@ class Database {
|
|||
left join arsse_enclosures on arsse_enclosures.article = arsse_articles.id
|
||||
left join arsse_label_members on arsse_label_members.subscription = arsse_subscriptions.id and arsse_label_members.article = arsse_articles.id and arsse_label_members.assigned = 1
|
||||
left join arsse_labels on arsse_labels.owner = arsse_subscriptions.owner and arsse_label_members.label = arsse_labels.id",
|
||||
["str"], [$user]
|
||||
["str"],
|
||||
[$user]
|
||||
);
|
||||
$q->setCTE("latest_editions(article,edition)", "SELECT article,max(id) from arsse_editions group by article", [], [], "join latest_editions on arsse_articles.id = latest_editions.article");
|
||||
if ($cols) {
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace JKingWeb\Arsse;
|
|||
use PasswordGenerator\Generator as PassGen;
|
||||
|
||||
class User {
|
||||
|
||||
public $id = null;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,6 @@ use Phake;
|
|||
|
||||
/** @covers \JKingWeb\Arsse\CLI */
|
||||
class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||
|
||||
public function setUp() {
|
||||
self::clearData(false);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ abstract class Base extends \JKingWeb\Arsse\Test\AbstractTest{
|
|||
protected static $failureReason = "";
|
||||
protected $primed = false;
|
||||
|
||||
protected abstract function nextID(string $table): int;
|
||||
abstract protected function nextID(string $table): int;
|
||||
|
||||
protected function findTraitOfTest(string $test): string {
|
||||
$class = new \ReflectionClass(self::class);
|
||||
|
|
|
@ -12,7 +12,6 @@ use JKingWeb\Arsse\Feed\Exception as FeedException;
|
|||
use Phake;
|
||||
|
||||
trait SeriesSubscription {
|
||||
|
||||
public function setUpSeriesSubscription() {
|
||||
$this->data = [
|
||||
'arsse_users' => [
|
||||
|
|
|
@ -275,7 +275,6 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
];
|
||||
foreach ($tests as $index => list($value, $type, $exp)) {
|
||||
$t = preg_replace("<^strict >", "", $type);
|
||||
if (gettype($exp) != "string") var_export($index);
|
||||
$exp = ($exp=="null") ? $exp : $this->decorateTypeSyntax($exp, $t);
|
||||
yield $index => [$value, $type, $exp];
|
||||
}
|
||||
|
@ -327,7 +326,6 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
];
|
||||
foreach ($tests as $index => list($value, $type, $exp)) {
|
||||
$t = preg_replace("<^strict >", "", $type);
|
||||
if (gettype($exp) != "string") var_export($index);
|
||||
$exp = ($exp=="null") ? $exp : $this->decorateTypeSyntax($exp, $t);
|
||||
yield $index => [$value, $type, $exp];
|
||||
}
|
||||
|
|
|
@ -23,9 +23,8 @@ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
|
|||
case "string":
|
||||
if (preg_match("<^char\((\d+)\)$>", $value, $match)) {
|
||||
return "U&'\\+".str_pad(dechex((int) $match[1]), 6, "0", \STR_PAD_LEFT)."'";
|
||||
} else {
|
||||
return $value;
|
||||
}
|
||||
return $value;
|
||||
default:
|
||||
return $value;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ use Phake;
|
|||
|
||||
/** @covers \JKingWeb\Arsse\User\Internal\Driver */
|
||||
class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||
|
||||
public function setUp() {
|
||||
self::clearData();
|
||||
self::setConf();
|
||||
|
|
|
@ -17,7 +17,6 @@ use Phake;
|
|||
|
||||
/** @covers \JKingWeb\Arsse\User */
|
||||
class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||
|
||||
public function setUp() {
|
||||
self::clearData();
|
||||
self::setConf();
|
||||
|
|
Loading…
Reference in a new issue