Installer: fix argument types for testConnection & return type for submit (#650)

* fix argument types for `testConnection`

* fix return type of submit
This commit is contained in:
Boy132 2024-10-21 18:43:16 +02:00 committed by GitHub
parent 3d5c8d14bd
commit a193b4f5ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -25,6 +25,7 @@ use Filament\Pages\SimplePage;
use Filament\Support\Enums\MaxWidth;
use Filament\Support\Exceptions\Halt;
use Illuminate\Http\RedirectResponse;
use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
@ -94,7 +95,7 @@ class PanelInstaller extends SimplePage implements HasForms
return 'data';
}
public function submit(): RedirectResponse
public function submit(): Redirector|RedirectResponse
{
// Disable installer
$this->writeToEnvironment(['APP_INSTALLED' => 'true']);

View File

@ -72,7 +72,7 @@ class DatabaseStep
});
}
private static function testConnection(string $driver, string $host, string $port, string $database, string $username, string $password): bool
private static function testConnection(string $driver, ?string $host, null|string|int $port, ?string $database, ?string $username, ?string $password): bool
{
if ($driver === 'sqlite') {
return true;

View File

@ -56,7 +56,7 @@ class RedisStep
});
}
private static function testConnection(string $host, string $port, string $username, string $password): bool
private static function testConnection(string $host, null|string|int $port, ?string $username, ?string $password): bool
{
try {
config()->set('database.redis._panel_install_test', [