Skip to content

Commit 45a6437

Browse files
Laravel Fixer (alexjustesen#592)
Co-authored-by: Shift <[email protected]>
1 parent f74fd82 commit 45a6437

File tree

7 files changed

+8
-13
lines changed

7 files changed

+8
-13
lines changed

app/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function handle(Request $request, Closure $next, string ...$guards): Resp
2121

2222
foreach ($guards as $guard) {
2323
if (Auth::guard($guard)->check()) {
24-
return redirect(RouteServiceProvider::HOME);
24+
return redirect()->to(RouteServiceProvider::HOME);
2525
}
2626
}
2727

app/Jobs/ExecSpeedtest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,5 @@ public function handle(): void
7777
} catch (\Exception $e) {
7878
Log::error($e->getMessage());
7979
}
80-
8180
}
8281
}

app/Models/Result.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getJitterData(): array
110110
*/
111111
public function previous(): ?self
112112
{
113-
return static::orderBy('id', 'desc')
113+
return static::orderByDesc('id')
114114
->where('id', '<', $this->id)
115115
->first();
116116
}

app/Providers/FilamentServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function register(): void
2424
public function boot(): void
2525
{
2626
try {
27-
config(['filament.brand' => app(GeneralSettings::class)->site_name ?? env('APP_NAME')]);
27+
config(['filament.brand' => app(GeneralSettings::class)->site_name ?? config('app.name')]);
2828
} catch (\Throwable $th) {
2929
// if this fails it's because the migration doesn't exist so it can be skipped
3030
}

app/Telegram/TelegramNotification.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,18 @@ public function __construct($message)
2626
* Get the notification's delivery channels.
2727
*
2828
* @param mixed $notifiable
29-
* @return array
3029
*/
31-
public function via($notifiable)
30+
public function via($notifiable): array
3231
{
3332
return ['telegram'];
3433
}
3534

3635
/**
37-
* Get the mail representation of the notification.
36+
* Get the Telegram message representation of the notification.
3837
*
3938
* @param mixed $notifiable
40-
* @return \Illuminate\Notifications\Messages\MailMessage
4139
*/
42-
public function toTelegram($notifiable)
40+
public function toTelegram($notifiable): TelegramMessage
4341
{
4442
return TelegramMessage::create()
4543
->to($notifiable->routes['telegram_chat_id'])

database/migrations/2022_10_24_152031_create_notifications_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function up(): void
2121
*
2222
* Docs: https://filamentphp.com/docs/2.x/notifications/database-notifications
2323
*/
24-
if (env('DB_CONNECTION') == 'pgsql') {
24+
if (config('database.default') == 'pgsql') {
2525
$table->json('data');
2626
} else {
2727
$table->text('data');

routes/web.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
|
1414
*/
1515

16-
Route::get('/', function () {
17-
return redirect('/admin');
18-
});
16+
Route::redirect('/', '/admin');
1917

2018
if (app()->isLocal()) {
2119
require __DIR__.'/test.php';

0 commit comments

Comments
 (0)