Skip to content

Fix InlineDocBlockSniff for abstract/interface methods#51

Merged
dereuromark merged 1 commit intomasterfrom
bugfix/type-safety-and-logic-fixes
Mar 27, 2026
Merged

Fix InlineDocBlockSniff for abstract/interface methods#51
dereuromark merged 1 commit intomasterfrom
bugfix/type-safety-and-logic-fixes

Conversation

@dereuromark
Copy link
Copy Markdown
Contributor

Summary

  • Skip methods without a body (abstract/interface) to avoid scanning wrong token ranges that led to false "Invalid Inline Doc Block" errors
  • Use scope_opener directly instead of searching for curly bracket
  • Fix hasReturnAsFollowingToken to use === false instead of !$var

Discovered while testing sniffs against PHP 8.4 test files with interface and abstract method edge cases.

- Skip methods without a body (abstract/interface) to avoid scanning
  wrong token ranges that led to false "Invalid Inline Doc Block" errors
- Use scope_opener directly instead of searching for curly bracket
- Fix hasReturnAsFollowingToken to use === false instead of !$var
@dereuromark dereuromark merged commit 6c2f79f into master Mar 27, 2026
4 checks passed
@dereuromark dereuromark deleted the bugfix/type-safety-and-logic-fixes branch March 27, 2026 09:01
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