Skip to content

Remove redundant checks already covered by is_callable()#13

Merged
henriquemoody merged 1 commit intomainfrom
is_callable
May 10, 2026
Merged

Remove redundant checks already covered by is_callable()#13
henriquemoody merged 1 commit intomainfrom
is_callable

Conversation

@henriquemoody
Copy link
Copy Markdown
Member

…able()

Before this change, the array callable branches included explicit isset(), is_string(), and is_object() checks to narrow the type for static analysis. After updating PHPStan, it now understands that is_callable() on an array already guarantees those conditions, making the extra checks dead code that adds noise without providing safety.

Assisted-by: Claude Code (claude-sonnet-4-6)

Before this change, the array callable branches included explicit isset(),
is_string(), and is_object() checks to narrow the type for static analysis.
After updating PHPStan, it now understands that is_callable() on an array
already guarantees those conditions, making the extra checks dead code that
adds noise without providing safety.

Assisted-by: Claude Code (claude-sonnet-4-6)
@henriquemoody henriquemoody changed the title Remove redundant checks in CallableHandler already covered by is_call… Remove redundant checks already covered by is_callable() May 10, 2026
@henriquemoody henriquemoody merged commit 742bf04 into main May 10, 2026
11 checks passed
@henriquemoody henriquemoody deleted the is_callable branch May 10, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant