Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
hkp22 authored and github-actions[bot] committed Jun 11, 2024
1 parent 8ddf93f commit b309f26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Traits/Reactable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -223,15 +223,15 @@ 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();
}

if ($user instanceof ReactsInterface) {
return $user;
}

if (!$user) {
if (! $user) {
throw InvalidReactionUser::notDefined();
}

Expand Down
6 changes: 3 additions & 3 deletions src/Traits/Reacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function reactTo(ReactableInterface $reactable, $type)
Helper::resolveReactsIdColumn() => $this->getKey(),
])->first();

if (!$reaction) {
if (! $reaction) {
return $this->storeReaction($reactable, $type);
}

Expand All @@ -48,7 +48,7 @@ public function removeReactionFrom(ReactableInterface $reactable)
Helper::resolveReactsIdColumn() => $this->getKey(),
])->first();

if (!$reaction) {
if (! $reaction) {
return;
}

Expand All @@ -68,7 +68,7 @@ public function toggleReactionOn(ReactableInterface $reactable, $type)
Helper::resolveReactsIdColumn() => $this->getKey(),
])->first();

if (!$reaction) {
if (! $reaction) {
return $this->storeReaction($reactable, $type);
}

Expand Down

0 comments on commit b309f26

Please sign in to comment.