From 03092466f59c67d4208a37ef24c75bf9cdf287b0 Mon Sep 17 00:00:00 2001 From: Cachet Bot Date: Wed, 1 Apr 2020 10:44:53 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Http/Controllers/StatusPageController.php | 4 ++-- app/Http/Controllers/SubscribeController.php | 8 ++++++-- .../Component/ComponentStatusWasChangedEventTest.php | 1 + tests/Functional/Notifications/MailTest.php | 9 ++++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/StatusPageController.php b/app/Http/Controllers/StatusPageController.php index 712fd9c1..9ae37c8b 100644 --- a/app/Http/Controllers/StatusPageController.php +++ b/app/Http/Controllers/StatusPageController.php @@ -101,8 +101,8 @@ class StatusPageController extends AbstractApiController $endDate->format('Y-m-d').' 00:00:00', $startDate->format('Y-m-d').' 23:59:59', ])->orderBy('occurred_at', 'desc')->get()->groupBy(function (Incident $incident) { - return app(DateFactory::class)->make($incident->occurred_at)->toDateString(); - }); + return app(DateFactory::class)->make($incident->occurred_at)->toDateString(); + }); if (!$onlyDisruptedDays) { $incidentDays = array_pad([], $appIncidentDays, null); diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 8527217b..afa866a9 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -94,8 +94,12 @@ class SubscribeController extends Controller $subscription->notify(new ManageSubscriptionNotification()); return redirect()->back()->withSuccess( - sprintf('%s %s', trans('dashboard.notifications.awesome'), - trans('cachet.subscriber.email.manage_subscription'))); + sprintf( + '%s %s', + trans('dashboard.notifications.awesome'), + trans('cachet.subscriber.email.manage_subscription') + ) + ); } /** diff --git a/tests/Bus/Events/Component/ComponentStatusWasChangedEventTest.php b/tests/Bus/Events/Component/ComponentStatusWasChangedEventTest.php index 03ff21ba..a6a15dda 100644 --- a/tests/Bus/Events/Component/ComponentStatusWasChangedEventTest.php +++ b/tests/Bus/Events/Component/ComponentStatusWasChangedEventTest.php @@ -26,6 +26,7 @@ class ComponentStatusWasChangedEventTest extends AbstractComponentEventTestCase { use DatabaseMigrations; use InteractsWithMail; + public function testComponentUpdateEmailWasSent() { $user = factory('CachetHQ\Cachet\Models\User')->create(); diff --git a/tests/Functional/Notifications/MailTest.php b/tests/Functional/Notifications/MailTest.php index 10449a85..59c5d090 100644 --- a/tests/Functional/Notifications/MailTest.php +++ b/tests/Functional/Notifications/MailTest.php @@ -137,7 +137,8 @@ class MailTest extends AbstractTestCase ]); Notification::assertSentTo( - [$subscriber], NewIncidentNotification::class + [$subscriber], + NewIncidentNotification::class ); } @@ -161,7 +162,8 @@ class MailTest extends AbstractTestCase ]); Notification::assertNotSentTo( - [$subscriber], NewIncidentNotification::class + [$subscriber], + NewIncidentNotification::class ); } @@ -184,7 +186,8 @@ class MailTest extends AbstractTestCase ]); Notification::assertSentTo( - [$subscriber], IncidentUpdatedNotification::class + [$subscriber], + IncidentUpdatedNotification::class ); } }