fix: add return types to render() methods

Add \Illuminate\Contracts\View\View return type to 23 Livewire
and Blade component render() methods for better static analysis.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Snider 2026-01-29 23:12:35 +00:00
parent 7e367803fc
commit 560c6aec4d
23 changed files with 23 additions and 23 deletions

View file

@ -362,7 +362,7 @@ class ActivityFeed extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('core.activity::admin.activity-feed');
}

View file

@ -271,7 +271,7 @@ class ConfigPanel extends Component
$this->dispatch('config-cleared');
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('core.config::admin.config-panel')
->layout('hub::admin.layouts.app', ['title' => 'Configuration']);

View file

@ -277,7 +277,7 @@ class WorkspaceConfig extends Component
$this->dispatch('config-cleared');
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('core.config::admin.workspace-config')
->layout('hub::admin.layouts.app', ['title' => 'Settings']);

View file

@ -34,7 +34,7 @@ class ActivityFeed extends Component
return $item['color'] ?? 'gray';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.activity-feed');
}

View file

@ -57,7 +57,7 @@ class ActivityLog extends Component
return is_array($value) ? json_encode($value) : (string) $value;
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.activity-log');
}

View file

@ -42,7 +42,7 @@ class Alert extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.alert');
}

View file

@ -52,7 +52,7 @@ class CardGrid extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.card-grid');
}

View file

@ -26,7 +26,7 @@ class ClearFilters extends Component
->implode('; ');
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.clear-filters');
}

View file

@ -45,7 +45,7 @@ class DataTable extends Component
return $align === 'right' ? 'text-right' : '';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.data-table');
}

View file

@ -74,7 +74,7 @@ class EditableTable extends Component
return count($this->columns) + ($this->selectable ? 1 : 0);
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.editable-table');
}

View file

@ -49,7 +49,7 @@ class Filter extends Component
})->values()->all();
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.filter');
}

View file

@ -34,7 +34,7 @@ class FilterBar extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.filter-bar');
}

View file

@ -44,7 +44,7 @@ class LinkGrid extends Component
return $item['icon'] ?? 'arrow-right';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.link-grid');
}

View file

@ -56,7 +56,7 @@ class ManagerTable extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.manager-table');
}

View file

@ -34,7 +34,7 @@ class Metrics extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.metrics');
}

View file

@ -52,7 +52,7 @@ class ProgressList extends Component
return is_numeric($value) ? number_format($value) : (string) $value;
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.progress-list');
}

View file

@ -24,7 +24,7 @@ class Search extends Component
$this->wireModel = $this->model ? "wire:model.live.debounce.300ms=\"{$this->model}\"" : '';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.search');
}

View file

@ -52,7 +52,7 @@ class ServiceCard extends Component
$this->statusColor = $this->status === 'online' ? 'green' : 'red';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.service-card');
}

View file

@ -51,7 +51,7 @@ class Sidemenu extends Component
return app(AdminMenuRegistry::class)->build($workspace, $isAdmin);
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.sidemenu');
}

View file

@ -36,7 +36,7 @@ class Stats extends Component
};
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.stats');
}

View file

@ -39,7 +39,7 @@ class StatusCards extends Component
return $item['color'] ?? 'gray';
}
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('admin::components.status-cards');
}

View file

@ -451,7 +451,7 @@ class HeaderConfigurationManager extends Component
/**
* Render the component.
*/
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('core::headers.livewire.header-configuration-manager');
}

View file

@ -17,7 +17,7 @@ use Livewire\Component;
*/
class Index extends Component
{
public function render()
public function render(): \Illuminate\Contracts\View\View
{
return view('trees::web.index', [
'stats' => $this->getGlobalStats(),