From f5a5f39ae35b910693cd482e3c2f3230d55f4164 Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 22 Mar 2020 23:31:27 +0000 Subject: [PATCH] Apply fixes from StyleCI --- migrations/2019_07_01_000000_add_polls_table.php | 2 -- migrations/2019_07_01_000001_add_poll_options_table.php | 2 -- migrations/2019_07_01_000002_add_poll_votes_table.php | 2 -- src/Commands/VotePollHandler.php | 4 +++- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/migrations/2019_07_01_000000_add_polls_table.php b/migrations/2019_07_01_000000_add_polls_table.php index 55fc8fc3..4e100ed5 100755 --- a/migrations/2019_07_01_000000_add_polls_table.php +++ b/migrations/2019_07_01_000000_add_polls_table.php @@ -33,7 +33,6 @@ function (Builder $schema) { $table->foreign('user_id')->references('id')->on('users')->onDelete('set null'); }); }, - function (Builder $schema) { // delete polls whose discussion was deleted $polls = Poll::doesntHave('discussion')->get(); @@ -66,7 +65,6 @@ function (Builder $schema) { $table->foreign('user_id')->references('id')->on('users')->onDelete('set null'); }); }, - function (Builder $schema) { $schema->dropIfExists('polls'); } diff --git a/migrations/2019_07_01_000001_add_poll_options_table.php b/migrations/2019_07_01_000001_add_poll_options_table.php index a45508e0..e25edbf4 100755 --- a/migrations/2019_07_01_000001_add_poll_options_table.php +++ b/migrations/2019_07_01_000001_add_poll_options_table.php @@ -28,7 +28,6 @@ function (Builder $schema) { $table->foreign('poll_id')->references('id')->on('polls')->onDelete('cascade'); }); }, - function (Builder $schema) { // delete poll options that don't have a poll PollOption::query()->doesntHave('poll')->delete(); @@ -41,7 +40,6 @@ function (Builder $schema) { $table->foreign('poll_id')->references('id')->on('polls')->onDelete('cascade'); }); }, - function (Builder $schema) { $schema->dropIfExists('poll_options'); } diff --git a/migrations/2019_07_01_000002_add_poll_votes_table.php b/migrations/2019_07_01_000002_add_poll_votes_table.php index 4e133749..10a1573f 100755 --- a/migrations/2019_07_01_000002_add_poll_votes_table.php +++ b/migrations/2019_07_01_000002_add_poll_votes_table.php @@ -30,7 +30,6 @@ function (Builder $schema) { $table->foreign('user_id')->references('id')->on('users')->onDelete('set null'); }); }, - function (Builder $schema) { // delete votes that don't have a poll or option PollVote::query()->doesntHave('poll')->orDoesntHave('option')->delete(); @@ -44,7 +43,6 @@ function (Builder $schema) { $table->foreign('option_id')->references('id')->on('poll_options')->onDelete('cascade'); }); }, - function (Builder $schema) { $schema->dropIfExists('poll_votes'); } diff --git a/src/Commands/VotePollHandler.php b/src/Commands/VotePollHandler.php index e7daebfa..cfdff3c7 100755 --- a/src/Commands/VotePollHandler.php +++ b/src/Commands/VotePollHandler.php @@ -76,6 +76,7 @@ public function handle(VotePoll $command) /** * @param $vote + * * @throws \Pusher\PusherException */ public function pushNewVote($vote) @@ -86,8 +87,9 @@ public function pushNewVote($vote) } /** - * @return bool|\Illuminate\Foundation\Application|mixed|Pusher * @throws \Pusher\PusherException + * + * @return bool|\Illuminate\Foundation\Application|mixed|Pusher */ private function getPusher() {