Skip to content

fix: correct PHPStan condition callback type - #924

Merged
shyim merged 1 commit into
mainfrom
fix/phpstan-condition-callback
Nov 3, 2026
Merged

shyim merged 1 commit into
mainfrom
fix/phpstan-condition-callback

Conversation

@shyim

@shyim shyim commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Declare the condition callback as callable(Context): bool on the property and constructor parameter so PHPStan can verify its negated result. Runtime behavior is unchanged.

Validation:

  • vendor/bin/phpstan analyse --no-progress — passes with no errors.
  • vendor/bin/phpunit --no-coverage tests/Rule/ConditionTest.php — passes (2 tests, 2 assertions).

@shyim
shyim force-pushed the fix/phpstan-condition-callback branch from 723303e to 29078e5 Compare November 3, 2026 06:33
@shyim shyim changed the title Fix PHPStan condition callback type fix: correct PHPStan condition callback type Nov 3, 2026
@shyim
shyim merged commit ea00e9f into main Nov 3, 2026
5 checks passed
@shyim
shyim deleted the fix/phpstan-condition-callback branch November 3, 2026 06:33
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