Skip to content

Commit

Permalink
Simplify Conditional Statement (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnabil230 authored Nov 2, 2023
1 parent cf06f97 commit 966bc8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Http/Middleware/CheckCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public static function using(...$scopes)
{
if (is_array($scopes[0])) {
return static::class.':'.implode(',', $scopes[0]);
} else {
return static::class.':'.implode(',', $scopes);
}

return static::class.':'.implode(',', $scopes);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Middleware/CheckForAnyScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public static function using(...$scopes)
{
if (is_array($scopes[0])) {
return static::class.':'.implode(',', $scopes[0]);
} else {
return static::class.':'.implode(',', $scopes);
}

return static::class.':'.implode(',', $scopes);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Middleware/CheckScopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public static function using(...$scopes)
{
if (is_array($scopes[0])) {
return static::class.':'.implode(',', $scopes[0]);
} else {
return static::class.':'.implode(',', $scopes);
}

return static::class.':'.implode(',', $scopes);
}

/**
Expand Down

0 comments on commit 966bc8e

Please sign in to comment.