Fix PHPStan issues

This commit is contained in:
myrmidex 2025-07-10 11:24:48 +02:00
parent dd032b3a80
commit 76d642b8ee
5 changed files with 7 additions and 5 deletions

View file

@ -3,18 +3,20 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Setting; use App\Models\Setting;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class SettingsController extends Controller class SettingsController extends Controller
{ {
public function index() public function index(): View
{ {
$articleProcessingEnabled = Setting::isArticleProcessingEnabled(); $articleProcessingEnabled = Setting::isArticleProcessingEnabled();
return view('pages.settings.index', compact('articleProcessingEnabled')); return view('pages.settings.index', compact('articleProcessingEnabled'));
} }
public function update(Request $request) public function update(Request $request): RedirectResponse
{ {
$request->validate([ $request->validate([
'article_processing_enabled' => 'boolean', 'article_processing_enabled' => 'boolean',

View file

@ -23,7 +23,6 @@
* @property Carbon|null $last_fetched_at * @property Carbon|null $last_fetched_at
* @property Carbon $created_at * @property Carbon $created_at
* @property Carbon $updated_at * @property Carbon $updated_at
* @method static create(array<string, mixed> $validated)
* @method static orderBy(string $string, string $string1) * @method static orderBy(string $string, string $string1)
* @method static where(string $string, true $true) * @method static where(string $string, true $true)
* @method static findOrFail(mixed $feed_id) * @method static findOrFail(mixed $feed_id)

View file

@ -9,7 +9,6 @@
use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/** /**
* @method static create(array<string, mixed> $validated)
* @method static findMany(mixed $channel_ids) * @method static findMany(mixed $channel_ids)
* @property integer $id * @property integer $id
* @property integer $platform_instance_id * @property integer $platform_instance_id

View file

@ -15,7 +15,6 @@
* @property array<string, mixed> $filters * @property array<string, mixed> $filters
* @property Carbon $created_at * @property Carbon $created_at
* @property Carbon $updated_at * @property Carbon $updated_at
* @method static create(array<string, mixed> $array)
*/ */
class Route extends Pivot class Route extends Pivot
{ {

View file

@ -9,6 +9,9 @@
class SystemStatusService class SystemStatusService
{ {
/**
* @return array{is_enabled: bool, status: string, status_class: string, reasons: array<int, string>}
*/
public function getSystemStatus(): array public function getSystemStatus(): array
{ {
$reasons = []; $reasons = [];