Skip to content

fix: respect @param docblock overrides#55

Merged
AJenbo merged 1 commit intoAJenbo:mainfrom
calebdw:calebdw/push-tpwruoztqtkz
Mar 31, 2026
Merged

fix: respect @param docblock overrides#55
AJenbo merged 1 commit intoAJenbo:mainfrom
calebdw:calebdw/push-tpwruoztqtkz

Conversation

@calebdw
Copy link
Copy Markdown
Contributor

@calebdw calebdw commented Mar 30, 2026

Hello!

This closes #49, same thing, just had AI take a crack at it so feel free to make changes

Thanks!

@AJenbo AJenbo force-pushed the calebdw/push-tpwruoztqtkz branch from ff24f62 to 947e922 Compare March 31, 2026 14:04
When a method parameter has both a native type hint (e.g. Node) and a
@param docblock override (e.g. @param FuncCall $node), use
resolve_effective_type() to pick the more specific type before attempting
class resolution. Previously the native hint was resolved first and the
docblock was only checked as a fallback when the native hint didn't
resolve to a class, which meant @param overrides on resolvable types
were silently ignored.

Fixes AJenbo#49
@AJenbo AJenbo force-pushed the calebdw/push-tpwruoztqtkz branch from 947e922 to f88fd8d Compare March 31, 2026 14:06
@AJenbo AJenbo merged commit 110a5c4 into AJenbo:main Mar 31, 2026
4 of 5 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.94118% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.78%. Comparing base (eaa9b8a) to head (f88fd8d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/completion/types/conditional.rs 60.37% 21 Missing ⚠️
src/completion/variable/resolution.rs 89.47% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (72.94%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   87.81%   87.78%   -0.03%     
==========================================
  Files         144      144              
  Lines       82847    82890      +43     
==========================================
+ Hits        72749    72762      +13     
- Misses      10098    10128      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@calebdw calebdw deleted the calebdw/push-tpwruoztqtkz branch March 31, 2026 14:13
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: @param not recognized

3 participants