From d78903dd21fc4ca517f0264f575ffa944ddf4df1 Mon Sep 17 00:00:00 2001 From: christophrumpel Date: Wed, 5 Jun 2024 17:55:56 +0000 Subject: [PATCH] Fixes coding style --- .../Commands/CheckIfUpcomingStreamsAreLiveCommand.php | 6 +++--- .../CheckIfUpcomingStreamsAreLiveCommandTest.php | 6 +++--- tests/Feature/PagesResponseTest.php | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/Console/Commands/CheckIfUpcomingStreamsAreLiveCommand.php b/app/Console/Commands/CheckIfUpcomingStreamsAreLiveCommand.php index d46ecbd..945ef15 100644 --- a/app/Console/Commands/CheckIfUpcomingStreamsAreLiveCommand.php +++ b/app/Console/Commands/CheckIfUpcomingStreamsAreLiveCommand.php @@ -21,7 +21,7 @@ public function handle(): int ->where('scheduled_start_time', '<=', now()->addMinutes(30)) ->get() ->keyBy('youtube_id'); - + if ($streams->isEmpty()) { $this->info('There are no streams to update.'); @@ -31,7 +31,7 @@ public function handle(): int $this->info("Fetching {$streams->count()} stream(s) from API to update their status."); $updatesCount = YouTube::videos($streams->keys()) - ->map(fn(StreamData $streamData) => optional($streams + ->map(fn (StreamData $streamData) => optional($streams ->get($streamData->videoId)) ->update([ 'status' => $streamData->status, @@ -39,7 +39,7 @@ public function handle(): int ->filter() ->count(); - $this->info($updatesCount . ' stream(s) were updated.'); + $this->info($updatesCount.' stream(s) were updated.'); return self::SUCCESS; } diff --git a/tests/Feature/Commands/CheckIfUpcomingStreamsAreLiveCommandTest.php b/tests/Feature/Commands/CheckIfUpcomingStreamsAreLiveCommandTest.php index 063a548..21d64c9 100644 --- a/tests/Feature/Commands/CheckIfUpcomingStreamsAreLiveCommandTest.php +++ b/tests/Feature/Commands/CheckIfUpcomingStreamsAreLiveCommandTest.php @@ -4,7 +4,7 @@ use App\Models\Stream; use Illuminate\Support\Facades\Http; -it('updates upcoming streams that are soon live', function () { +it('updates upcoming streams that are soon live', function() { // Arrange Http::fake(); @@ -18,7 +18,7 @@ ->assertExitCode(0); }); -it('does not update finished or live streams', function () { +it('does not update finished or live streams', function() { // Arrange Http::fake(); Stream::factory()->live()->create(); @@ -30,7 +30,7 @@ ->assertExitCode(0); }); -it('does not update unapproved streams', function () { +it('does not update unapproved streams', function() { // Arrange Http::fake(); diff --git a/tests/Feature/PagesResponseTest.php b/tests/Feature/PagesResponseTest.php index 2d1b38d..38b985f 100644 --- a/tests/Feature/PagesResponseTest.php +++ b/tests/Feature/PagesResponseTest.php @@ -1,27 +1,27 @@ get(route('home')) ->assertOk(); }); -it('can show the feed', function () { +it('can show the feed', function() { $this->get('/feed') ->assertOk(); }); -it('can show the archive', function () { +it('can show the archive', function() { $this->get(route('archive')) ->assertOk(); }); -it('can show the calendar page', function () { +it('can show the calendar page', function() { $this->withoutExceptionHandling(); $this->get(route('calendar.ics')) ->assertOk(); }); -it('can privacy policy page', function () { +it('can privacy policy page', function() { $this->get(route('privacy.policy')) ->assertOk(); });