From b309f26333b4d7bb5a56c12727e6d3f0efb67454 Mon Sep 17 00:00:00 2001 From: hkp22 Date: Tue, 11 Jun 2024 09:42:28 +0000 Subject: [PATCH] Fix styling --- src/Traits/Reactable.php | 6 +++--- src/Traits/Reacts.php | 6 +++--- 2 files changed, 6 insertions(+), 6 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); }