From 39de88fbf73db0fd6e8664093855131d36020de5 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Tue, 11 Jun 2024 09:42:24 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Traits/Reactable.php | 6 +++--- src/Traits/Reacts.php | 6 +++--- tests/TestCase.php | 8 ++++---- tests/Unit/ReactsProfileModelTest.php | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Traits/Reactable.php b/src/Traits/Reactable.php index a6a0d68..adac9c0 100644 --- a/src/Traits/Reactable.php +++ b/src/Traits/Reactable.php @@ -197,7 +197,7 @@ public function scopeWhereReactedBy(Builder $query, $userId = null, $type = null try { $user = $this->getUser($userId); } catch (InvalidReactionUser $e) { - if (!$user && !$userId) { + if (! $user && ! $userId) { throw InvalidReactionUser::notDefined(); } } @@ -223,7 +223,7 @@ public function scopeWhereReactedBy(Builder $query, $userId = null, $type = null */ private function getUser($user = null) { - if (!$user && auth()->check()) { + if (! $user && auth()->check()) { return auth()->user(); } @@ -231,7 +231,7 @@ private function getUser($user = null) return $user; } - if (!$user) { + if (! $user) { throw InvalidReactionUser::notDefined(); } diff --git a/src/Traits/Reacts.php b/src/Traits/Reacts.php index 389237a..6847bb0 100644 --- a/src/Traits/Reacts.php +++ b/src/Traits/Reacts.php @@ -23,7 +23,7 @@ public function reactTo(ReactableInterface $reactable, $type) Helper::resolveReactsIdColumn() => $this->getKey(), ])->first(); - if (!$reaction) { + if (! $reaction) { return $this->storeReaction($reactable, $type); } @@ -48,7 +48,7 @@ public function removeReactionFrom(ReactableInterface $reactable) Helper::resolveReactsIdColumn() => $this->getKey(), ])->first(); - if (!$reaction) { + if (! $reaction) { return; } @@ -68,7 +68,7 @@ public function toggleReactionOn(ReactableInterface $reactable, $type) Helper::resolveReactsIdColumn() => $this->getKey(), ])->first(); - if (!$reaction) { + if (! $reaction) { return $this->storeReaction($reactable, $type); } diff --git a/tests/TestCase.php b/tests/TestCase.php index abb582a..dbf5b0c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -51,7 +51,7 @@ protected function publishPackageMigrations() */ protected function destroyPackageMigrations() { - File::cleanDirectory(__DIR__ . '/../vendor/orchestra/testbench-core/laravel/database/migrations'); + File::cleanDirectory(__DIR__.'/../vendor/orchestra/testbench-core/laravel/database/migrations'); } /** @@ -84,9 +84,9 @@ protected function getPackageProviders($app) */ protected function setUpDatabase() { - include_once __DIR__ . '/../migrations/2018_07_10_000000_create_reactions_table.php'; - include_once __DIR__ . '/database/migrations/2018_07_10_000000_create_users_table.php'; - include_once __DIR__ . '/database/migrations/2018_07_11_000000_create_articles_table.php'; + include_once __DIR__.'/../migrations/2018_07_10_000000_create_reactions_table.php'; + include_once __DIR__.'/database/migrations/2018_07_10_000000_create_users_table.php'; + include_once __DIR__.'/database/migrations/2018_07_11_000000_create_articles_table.php'; (new \CreateReactionsTable())->up(); (new \CreateUsersTable())->up(); diff --git a/tests/Unit/ReactsProfileModelTest.php b/tests/Unit/ReactsProfileModelTest.php index 1efabbb..473a923 100644 --- a/tests/Unit/ReactsProfileModelTest.php +++ b/tests/Unit/ReactsProfileModelTest.php @@ -9,10 +9,10 @@ class ReactsProfileModelTest extends TestCase { /** - * Actions to be performed on PHPUnit start. - * - * @return void - */ + * Actions to be performed on PHPUnit start. + * + * @return void + */ protected function setUp(): void { parent::setUp();