Skip to content

Commit

Permalink
Merge branch 'feature/php-stan' of github.com:vormkracht10/filament-t…
Browse files Browse the repository at this point in the history
…wo-factor-auth into feature/php-stan
  • Loading branch information
Baspa committed Aug 23, 2024
2 parents 7dc3aab + 8e7d08e commit dfd8274
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/Enums/TwoFactorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ enum TwoFactorType: string implements HasLabel
*/
public static function values(): array
{
return array_map(fn($type) => $type->getLabel(), self::cases());
return array_map(fn ($type) => $type->getLabel(), self::cases());
}

public function getLabel(): ?string
Expand All @@ -31,4 +31,4 @@ public function getLabel(): ?string
self::phone => __('SMS'),
};
}
}
}
26 changes: 13 additions & 13 deletions src/Http/Livewire/Auth/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

namespace Vormkracht10\TwoFactorAuth\Http\Livewire\Auth;

use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
use Filament\Actions\Action;
use Illuminate\Http\Request;
use Laravel\Fortify\Fortify;
use Laravel\Fortify\Features;
use Filament\Facades\Filament;
use Illuminate\Routing\Pipeline;
use Illuminate\Support\HtmlString;
use Illuminate\Support\Facades\Blade;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\Component;
use Filament\Forms\Components\TextInput;
use Filament\Notifications\Notification;
use Filament\Models\Contracts\FilamentUser;
use Filament\Notifications\Notification;
use Filament\Pages\Auth\Login as BaseLogin;
use Laravel\Fortify\Actions\CanonicalizeUsername;
use Illuminate\Http\Request;
use Illuminate\Routing\Pipeline;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
use Laravel\Fortify\Actions\AttemptToAuthenticate;
use Livewire\Features\SupportRedirects\Redirector;
use Laravel\Fortify\Actions\CanonicalizeUsername;
use Laravel\Fortify\Actions\EnsureLoginIsNotThrottled;
use Laravel\Fortify\Actions\PrepareAuthenticatedSession;
use Vormkracht10\TwoFactorAuth\Http\Responses\LoginResponse;
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
use Laravel\Fortify\Features;
use Laravel\Fortify\Fortify;
use Livewire\Features\SupportRedirects\Redirector;
use Vormkracht10\TwoFactorAuth\Http\Middleware\RedirectIfTwoFactorAuthenticatable;
use Vormkracht10\TwoFactorAuth\Http\Responses\LoginResponse;

class Login extends BaseLogin
{
Expand Down Expand Up @@ -74,7 +74,7 @@ protected function getFormSchema(): array
];
}

public function loginWithFortify(): LoginResponse|Redirector|null
public function loginWithFortify(): LoginResponse | Redirector | null
{
session()->put('panel', Filament::getCurrentPanel()?->getId() ?? null);

Expand Down Expand Up @@ -173,4 +173,4 @@ protected function getAuthenticateFormAction(): Action
->label(__('filament-panels::pages/auth/login.form.actions.authenticate.label'))
->submit('authenticate');
}
}
}
2 changes: 1 addition & 1 deletion src/Http/Livewire/Auth/LoginTwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ protected function getFormSchema(): array

];
}
}
}
3 changes: 1 addition & 2 deletions src/Http/Livewire/Auth/PasswordConfirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Vormkracht10\TwoFactorAuth\Http\Livewire\Auth;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Notifications\Notification;
Expand Down Expand Up @@ -49,4 +48,4 @@ public function render(): View
],
]);
}
}
}
2 changes: 1 addition & 1 deletion src/Traits/EnumArraySerializableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public static function array(): array

return array_combine($names, $values);
}
}
}
4 changes: 2 additions & 2 deletions src/Traits/EnumNamesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ trait EnumNamesTrait
*/
public static function names(): array
{
return array_map(fn($enum) => $enum->name, static::cases());
return array_map(fn ($enum) => $enum->name, static::cases());
}
}
}
4 changes: 2 additions & 2 deletions src/Traits/EnumValuesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ trait EnumValuesTrait
*/
public static function values(): array
{
return array_map(fn($enum) => $enum->value, static::cases());
return array_map(fn ($enum) => $enum->value, static::cases());
}
}
}

0 comments on commit dfd8274

Please sign in to comment.