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

Open
opened 2026-02-20 02:35:13 +00:00 by Clotho · 0 comments
Member

Issue

18+ public methods are missing return type hints, violating project type safety conventions.

Files Affected

High Priority Methods

src/Website/Hub/View/Modal/Admin/PlatformUser.php:

  • exportUserData() - Missing return type
  • workspaces() - Missing return type
  • availablePackages() - Missing return type
  • allFeatures() - Missing return type
  • render() - Should return View or string

src/Website/Hub/View/Modal/Admin/ActivityLog.php:

  • render() - Missing return type

src/Website/Hub/View/Modal/Admin/ServiceManager.php:

  • services() - Missing return type
  • render() - Missing return type

src/Website/Hub/View/Modal/Admin/Console.php:

  • render() - Missing return type

src/Website/Hub/View/Modal/Admin/WaitlistManager.php:

  • export() - Missing return type
  • getFilteredQuery() - Missing return type

Medium Priority

src/Mod/Hub/Migrations/*.php:

  • All up() methods - Should return void
  • All down() methods - Should return void

src/Search/Concerns/HasSearchProvider.php:

  • All methods need explicit return types

src/Website/Hub/View/Modal/Admin/Settings.php:

  • Several methods at lines 111-118 missing parameter types (e.g., $name, $default)

Required Change

Add explicit return type hints:

// Before
public function render() { ... }

// After
public function render(): View { ... }

Convention Reference

From CLAUDE.md:

Type hints - All parameters and return types

Priority

High - Essential for type safety and IDE support.

Discovered by

Automatic codebase scan (issue #3)

## Issue 18+ public methods are missing return type hints, violating project type safety conventions. ## Files Affected ### High Priority Methods **src/Website/Hub/View/Modal/Admin/PlatformUser.php:** - `exportUserData()` - Missing return type - `workspaces()` - Missing return type - `availablePackages()` - Missing return type - `allFeatures()` - Missing return type - `render()` - Should return `View` or `string` **src/Website/Hub/View/Modal/Admin/ActivityLog.php:** - `render()` - Missing return type **src/Website/Hub/View/Modal/Admin/ServiceManager.php:** - `services()` - Missing return type - `render()` - Missing return type **src/Website/Hub/View/Modal/Admin/Console.php:** - `render()` - Missing return type **src/Website/Hub/View/Modal/Admin/WaitlistManager.php:** - `export()` - Missing return type - `getFilteredQuery()` - Missing return type ### Medium Priority **src/Mod/Hub/Migrations/*.php:** - All `up()` methods - Should return `void` - All `down()` methods - Should return `void` **src/Search/Concerns/HasSearchProvider.php:** - All methods need explicit return types **src/Website/Hub/View/Modal/Admin/Settings.php:** - Several methods at lines 111-118 missing parameter types (e.g., `$name`, `$default`) ## Required Change Add explicit return type hints: ```php // Before public function render() { ... } // After public function render(): View { ... } ``` ## Convention Reference From CLAUDE.md: > **Type hints** - All parameters and return types ## Priority **High** - Essential for type safety and IDE support. ## Discovered by Automatic codebase scan (issue #3)
Clotho added the
discovery
label 2026-02-20 02:35:13 +00:00
Charon added
PHP
refactor
P2
and removed
discovery
labels 2026-02-20 12:16:55 +00:00
Clotho was assigned by Charon 2026-02-20 12:20:55 +00:00
Charon added the
agent-ready
label 2026-02-21 01:30:25 +00:00
Sign in to join this conversation.
No description provided.