Skip to content

fix: specify parameter names in Model @phpstan-method callable types - #10444

Open
gr8man wants to merge 1 commit into
codeigniter4:developfrom
gr8man:fix/10443-model-phpstan-method-callable
Open

fix: specify parameter names in Model @phpstan-method callable types#10444
gr8man wants to merge 1 commit into
codeigniter4:developfrom
gr8man:fix/10443-model-phpstan-method-callable

Conversation

@gr8man

@gr8man gr8man commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes PhpStorm docblock parsing errors (Expected: variable) on Model @phpstan-method annotations for when() and whenNot() methods by:

  1. Adding explicit mixed type hint to $condition parameter (mixed $condition).
  2. Specifying parameter names $builder and $value in the callable(...) signature.
  3. Replacing (callable(...))|null with standard nullable type syntax ?callable(...).

Fixes #10443

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@gr8man
gr8man force-pushed the fix/10443-model-phpstan-method-callable branch from 1fe8286 to eca8178 Compare August 11, 2026 23:35

@paulbalandan paulbalandan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still red on PHPStorm.

@paulbalandan

Copy link
Copy Markdown
Member

And pls use the PR template moving forward.

@gr8man
gr8man force-pushed the fix/10443-model-phpstan-method-callable branch from eca8178 to 0c3f1a2 Compare August 12, 2026 11:14
@gr8man
gr8man force-pushed the fix/10443-model-phpstan-method-callable branch from 0c3f1a2 to a5fd490 Compare August 12, 2026 11:16
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.

Bug: PhpStorm is throwing errors on the system/ model.php when I view the code

2 participants