From 76d642b8ee05464abd32dd96e0b853b5c812d649 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Thu, 10 Jul 2025 11:24:48 +0200 Subject: [PATCH] Fix PHPStan issues --- app/Http/Controllers/SettingsController.php | 6 ++++-- app/Models/Feed.php | 1 - app/Models/PlatformChannel.php | 1 - app/Models/Route.php | 1 - app/Services/SystemStatusService.php | 3 +++ 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index cc168a8..3fdba8c 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -3,18 +3,20 @@ namespace App\Http\Controllers; use App\Models\Setting; +use Illuminate\Contracts\View\View; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; class SettingsController extends Controller { - public function index() + public function index(): View { $articleProcessingEnabled = Setting::isArticleProcessingEnabled(); return view('pages.settings.index', compact('articleProcessingEnabled')); } - public function update(Request $request) + public function update(Request $request): RedirectResponse { $request->validate([ 'article_processing_enabled' => 'boolean', diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 306248f..5e543e7 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -23,7 +23,6 @@ * @property Carbon|null $last_fetched_at * @property Carbon $created_at * @property Carbon $updated_at - * @method static create(array $validated) * @method static orderBy(string $string, string $string1) * @method static where(string $string, true $true) * @method static findOrFail(mixed $feed_id) diff --git a/app/Models/PlatformChannel.php b/app/Models/PlatformChannel.php index b0731e2..32b2fb3 100644 --- a/app/Models/PlatformChannel.php +++ b/app/Models/PlatformChannel.php @@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; /** - * @method static create(array $validated) * @method static findMany(mixed $channel_ids) * @property integer $id * @property integer $platform_instance_id diff --git a/app/Models/Route.php b/app/Models/Route.php index 3bb80d9..4101c39 100644 --- a/app/Models/Route.php +++ b/app/Models/Route.php @@ -15,7 +15,6 @@ * @property array $filters * @property Carbon $created_at * @property Carbon $updated_at - * @method static create(array $array) */ class Route extends Pivot { diff --git a/app/Services/SystemStatusService.php b/app/Services/SystemStatusService.php index 2e44490..67e67bc 100644 --- a/app/Services/SystemStatusService.php +++ b/app/Services/SystemStatusService.php @@ -9,6 +9,9 @@ class SystemStatusService { + /** + * @return array{is_enabled: bool, status: string, status_class: string, reasons: array} + */ public function getSystemStatus(): array { $reasons = [];