chore: fix code style with Laravel Pint

This commit is contained in:
root
2026-05-23 19:05:37 +02:00
parent 0795cd283d
commit 2d8beaa531
38 changed files with 68 additions and 43 deletions
@@ -4,6 +4,7 @@ namespace App\Services\Community;
use App\Models\RadioSchedule;
use App\Models\User;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;
class RadioScheduleService
@@ -53,7 +54,7 @@ class RadioScheduleService
->get());
}
public function getFullSchedule(): \Illuminate\Support\Collection
public function getFullSchedule(): Collection
{
return Cache::remember('radio_schedule_all', 300, fn () => RadioSchedule::with('user:id,username,look')
->active()
@@ -70,7 +70,7 @@ class DatabaseDiagnostic
return DiagnosticResult::error(
'Required Tables',
'Missing: ' . implode(', ', $missing),
'Run: php artisan migrate'
'Run: php artisan migrate',
);
}
@@ -95,7 +95,7 @@ class DatabaseDiagnostic
return DiagnosticResult::warning(
'Radio Tables',
'Missing: ' . implode(', ', $missing),
'Run radio migration seeder'
'Run radio migration seeder',
);
}
@@ -17,10 +17,10 @@ class DiagnosticRunner
$this->results = [];
$diagnostics = [
new DatabaseDiagnostic(),
new SecurityDiagnostic(),
new SystemDiagnostic(),
new HttpDiagnostic(),
new DatabaseDiagnostic,
new SecurityDiagnostic,
new SystemDiagnostic,
new HttpDiagnostic,
];
foreach ($diagnostics as $diagnostic) {
+3 -3
View File
@@ -26,7 +26,7 @@ class HttpDiagnostic
return DiagnosticResult::warning(
'App URL',
'APP_URL not configured properly',
'Set APP_URL in .env to your domain'
'Set APP_URL in .env to your domain',
);
}
@@ -34,7 +34,7 @@ class HttpDiagnostic
return DiagnosticResult::warning(
'App URL',
'Not using HTTPS in production',
'Configure SSL and update APP_URL'
'Configure SSL and update APP_URL',
);
}
@@ -87,7 +87,7 @@ class HttpDiagnostic
return DiagnosticResult::warning(
'HTTP Redirect',
"HTTP returns {$response->status()} instead of redirect",
'Configure web server to redirect HTTP to HTTPS'
'Configure web server to redirect HTTP to HTTPS',
);
} catch (\Exception $e) {
return DiagnosticResult::warning('HTTP Redirect', 'Could not test: ' . $e->getMessage());
@@ -36,7 +36,7 @@ class SecurityDiagnostic
return DiagnosticResult::error(
'Debug Mode',
'Debug mode is enabled in production',
'Set APP_DEBUG=false in .env'
'Set APP_DEBUG=false in .env',
);
}
@@ -56,7 +56,7 @@ class SecurityDiagnostic
return DiagnosticResult::warning(
'.env File',
'File appears to be on a single line',
'Ensure .env has proper line breaks'
'Ensure .env has proper line breaks',
);
}
@@ -81,7 +81,7 @@ class SecurityDiagnostic
return DiagnosticResult::error(
'File Permissions',
'Not writable: ' . implode(', ', $issues),
'Run: chmod -R 775 storage bootstrap/cache'
'Run: chmod -R 775 storage bootstrap/cache',
);
}
@@ -30,7 +30,7 @@ class SystemDiagnostic
return DiagnosticResult::error(
'PHP Extensions',
'Missing: ' . implode(', ', $missing),
'Install: sudo apt install php-' . implode(' php-', $missing)
'Install: sudo apt install php-' . implode(' php-', $missing),
);
}
@@ -46,7 +46,7 @@ class SystemDiagnostic
return DiagnosticResult::error(
'PHP Version',
'Current: ' . PHP_VERSION . ' (minimum: 8.1)',
'Upgrade PHP to 8.1 or higher'
'Upgrade PHP to 8.1 or higher',
);
}
@@ -77,7 +77,7 @@ class SystemDiagnostic
return DiagnosticResult::warning(
'Session',
'Using file sessions in production',
'Consider using redis or database sessions'
'Consider using redis or database sessions',
);
}
@@ -4,7 +4,6 @@ declare(strict_types=1);
namespace App\Services\Emulator;
use App\Services\Emulator\EmulatorSqlService;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Process;
@@ -4,7 +4,6 @@ declare(strict_types=1);
namespace App\Services\Emulator;
use App\Services\Emulator\EmulatorSourceService;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Process;
+10 -3
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Services;
use App\Models\Miscellaneous\WebsiteSetting;
use App\Services\Emulator\EmulatorBackupService;
use App\Services\Emulator\EmulatorBuildService;
use App\Services\Emulator\EmulatorJarService;
@@ -17,11 +18,17 @@ use Illuminate\Support\Facades\Process;
class EmulatorUpdateService
{
private readonly EmulatorStatusService $statusService;
private readonly EmulatorJarService $jarService;
private readonly EmulatorSourceService $sourceService;
private readonly EmulatorBuildService $buildService;
private readonly EmulatorSqlService $sqlService;
private readonly EmulatorBackupService $backupService;
private readonly SettingsService $settings;
public function __construct()
@@ -217,9 +224,9 @@ class EmulatorUpdateService
public function resetInstalledDate(): void
{
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_jar_installed_date')->delete();
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_source_commit')->delete();
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_source_date')->delete();
WebsiteSetting::where('key', 'emulator_jar_installed_date')->delete();
WebsiteSetting::where('key', 'emulator_source_commit')->delete();
WebsiteSetting::where('key', 'emulator_source_date')->delete();
}
public function clearAllLogs(): array