refactor: add Builder return types to all Eloquent query scopes #46

Merged
Snider merged 1 commit from refactor/scope-return-types into main 2026-02-23 06:09:02 +00:00
Member

Summary

Adds explicit \Illuminate\Database\Eloquent\Builder return types to all Eloquent query scope methods across the models.

Closes #16

Changes

  • Added Builder return type hints to all scope* methods in Eloquent models
  • Ensures strict type compliance with declare(strict_types=1) already in place
  • Improves IDE support and static analysis accuracy

Test plan

  • Run composer run lint to verify code style passes
  • Run composer run test to verify all tests pass
  • Verify no scope method calls are broken by the return type additions
## Summary Adds explicit `\Illuminate\Database\Eloquent\Builder` return types to all Eloquent query scope methods across the models. Closes #16 ## Changes - Added `Builder` return type hints to all `scope*` methods in Eloquent models - Ensures strict type compliance with `declare(strict_types=1)` already in place - Improves IDE support and static analysis accuracy ## Test plan - [ ] Run `composer run lint` to verify code style passes - [ ] Run `composer run test` to verify all tests pass - [ ] Verify no scope method calls are broken by the return type additions
Clotho added 1 commit 2026-02-23 05:33:20 +00:00
refactor: add Builder return types to all Eloquent query scopes
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m11s
CI / PHP 8.4 (pull_request) Failing after 1m2s
2bc17efa47
Add `Builder $query` parameter type and `: Builder` return type to
18 query scopes across 8 model files. Import `Illuminate\Database\Eloquent\Builder`
in each affected model.

Affected models: Task, AgentSession, AgentApiKey, AgentPhase, AgentPlan,
Prompt, AgentWorkspaceState, WorkspaceState.

Closes #16

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Snider merged commit c4af06bc02 into main 2026-02-23 06:09:02 +00:00
Snider deleted branch refactor/scope-return-types 2026-02-23 06:09:02 +00:00
Sign in to join this conversation.
No description provided.