Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte authored and github-actions[bot] committed Feb 13, 2025
1 parent 6c7b1de commit addf63f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ public static function getNames($model): Collection

/**
* Get the model class associated with a given provider.
*
* @param string $provider
* @return string|null
*/
protected static function getProviderModel(string $provider): ?string
{
Expand Down Expand Up @@ -70,7 +67,7 @@ protected static function getConfigAuthGuards(string $class): Collection
{
return collect(config('auth.guards'))
->map(function ($guard) {
if (!isset($guard['provider'])) {
if (! isset($guard['provider'])) {
return null;
}

Expand All @@ -82,16 +79,13 @@ protected static function getConfigAuthGuards(string $class): Collection

/**
* Get the model associated with a given guard name.
*
* @param string $guard
* @return string|null
*/
public static function getModelForGuard(string $guard): ?string
{
// Get the provider configuration for the given guard
$provider = config("auth.guards.{$guard}.provider");

if (!$provider) {
if (! $provider) {
return null;
}

Expand Down
3 changes: 0 additions & 3 deletions src/helpers.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

if (! function_exists('getModelForGuard')) {
/**
* @return string|null
*/
function getModelForGuard(string $guard): ?string
{
return Spatie\Permission\Guard::getModelForGuard($guard);
Expand Down

0 comments on commit addf63f

Please sign in to comment.