refactor: add missing return type hints to 18+ methods #34

Open
Charon wants to merge 0 commits from feat/return-type-hints into dev
Member

Summary

Fixes #6 — adds explicit return type declarations to 13 methods across 6 admin Livewire components that were missing them, improving type safety and IDE support per CLAUDE.md conventions.

Changes

  • PlatformUser.php: exportUserData(): mixed, workspaces(): Collection, availablePackages(): Collection, allFeatures(): Collection, render(): View
  • ActivityLog.php: render(): View
  • ServiceManager.php: services(): Collection, render(): View
  • Console.php: render(): View
  • WaitlistManager.php: export(): mixed, getFilteredQuery(): Builder, render(): View
  • Settings.php: render(): View

Notes

  • Migration files (up()/down()) and HasSearchProvider trait already had correct return types — no changes needed.
  • render() methods use Illuminate\Contracts\View\View matching existing codebase convention.
  • exportUserData() and export() return mixed because they delegate through rateLimit() which returns mixed.

Test plan

  • Verify PHP syntax passes (php -l) on all 6 modified files
  • Confirm no runtime regressions in admin panel components

🤖 Generated with Claude Code

## Summary Fixes #6 — adds explicit return type declarations to 13 methods across 6 admin Livewire components that were missing them, improving type safety and IDE support per CLAUDE.md conventions. ## Changes - **PlatformUser.php**: `exportUserData(): mixed`, `workspaces(): Collection`, `availablePackages(): Collection`, `allFeatures(): Collection`, `render(): View` - **ActivityLog.php**: `render(): View` - **ServiceManager.php**: `services(): Collection`, `render(): View` - **Console.php**: `render(): View` - **WaitlistManager.php**: `export(): mixed`, `getFilteredQuery(): Builder`, `render(): View` - **Settings.php**: `render(): View` ## Notes - Migration files (`up()`/`down()`) and `HasSearchProvider` trait already had correct return types — no changes needed. - `render()` methods use `Illuminate\Contracts\View\View` matching existing codebase convention. - `exportUserData()` and `export()` return `mixed` because they delegate through `rateLimit()` which returns `mixed`. ## Test plan - [ ] Verify PHP syntax passes (`php -l`) on all 6 modified files - [ ] Confirm no runtime regressions in admin panel components 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/return-type-hints:feat/return-type-hints
git checkout feat/return-type-hints

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/return-type-hints
git checkout feat/return-type-hints
git rebase dev
git checkout dev
git merge --ff-only feat/return-type-hints
git checkout feat/return-type-hints
git rebase dev
git checkout dev
git merge --no-ff feat/return-type-hints
git checkout dev
git merge --squash feat/return-type-hints
git checkout dev
git merge --ff-only feat/return-type-hints
git checkout dev
git merge feat/return-type-hints
git push origin dev
Sign in to join this conversation.
No description provided.