From fb76775716a0631fda3473a116e706bfc3d28e49 Mon Sep 17 00:00:00 2001 From: Bruno Aleixo Date: Sun, 30 Jan 2022 16:41:54 +0000 Subject: [PATCH] [TOOLS][COMPONENTS][CORE] Ran cs-fixer on all files --- components/Notification/Notification.php | 2 +- components/Subscription/Subscription.php | 2 +- extlib/Validate.php | 5 ++--- src/Core/I18n/I18n.php | 2 -- src/Routes/Main.php | 1 - 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/Notification/Notification.php b/components/Notification/Notification.php index b685c2c32f..f1b098c58f 100644 --- a/components/Notification/Notification.php +++ b/components/Notification/Notification.php @@ -92,7 +92,7 @@ class Notification extends Component // XXX: Unideal as in failures the rollback will leave behind a false notification, // but most notifications (all) require flushing the objects first // Should be okay as long as implementors bear this in mind - DB::wrapInTransaction(fn() => DB::persist(Entity\Notification::create([ + DB::wrapInTransaction(fn () => DB::persist(Entity\Notification::create([ 'activity_id' => $activity->getId(), 'target_id' => $target->getId(), 'reason' => $reason, diff --git a/components/Subscription/Subscription.php b/components/Subscription/Subscription.php index 9ed892041a..4a04838713 100644 --- a/components/Subscription/Subscription.php +++ b/components/Subscription/Subscription.php @@ -70,7 +70,7 @@ class Subscription extends Component $cache_subscriber = Cache::delete(Actor::cacheKeys($subscriber_id)['subscribed']); $cache_subscribed = Cache::delete(Actor::cacheKeys($subscribed_id)['subscribers']); - return [$cache_subscriber,$cache_subscribed]; + return [$cache_subscriber, $cache_subscribed]; } /** diff --git a/extlib/Validate.php b/extlib/Validate.php index 5d803ba68a..f4782d53d3 100644 --- a/extlib/Validate.php +++ b/extlib/Validate.php @@ -729,9 +729,8 @@ class Validate /** * Substr * - * @param string &$date Date - * @param string $num Length - * @param false|string $opt Unknown + * @param string $num Length + * @param false|string $opt Unknown */ private static function substr( string &$date, diff --git a/src/Core/I18n/I18n.php b/src/Core/I18n/I18n.php index 2e2eb25b82..65acc178bd 100644 --- a/src/Core/I18n/I18n.php +++ b/src/Core/I18n/I18n.php @@ -305,8 +305,6 @@ abstract class I18n * _m(string|string[] $msg, array $params) -- message * _m(string $ctx, string|string[] $msg, array $params) -- combination of the previous two * - * @param mixed ...$args - * * @throws ServerException * * @todo add parameters diff --git a/src/Routes/Main.php b/src/Routes/Main.php index b767b05de7..6291932d65 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -58,7 +58,6 @@ abstract class Main $r->connect('panel', '/panel', [C\AdminPanel::class, 'site']); $r->connect('panel_site', '/panel/site', [C\AdminPanel::class, 'site']); - // TODO: don't do $r->connect('actor_circle', '/', RedirectController::class, ['defaults' => ['route' => 'feed_public']]);