Support `@phan-closure-scope` in the global scope, for `$this`
Open
Nobody has claimed this yet.
enhancement
probably easy
- Dominant language
- PHP
- Stars
- 5.6k
- Forks
- 365
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 6
Description
E.g.
<?php
// inline no-op comment string
'@phan-closure-scope TemplateClassWithItemCount description';
?>
<p><?= sprintf("You have %d item(s)", $this->itemCount); ?></p>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reproducing the issue with the provided PHP template and inspect how Phan handles the @phan-closure-scope annotation in global scope. Done means the example is analyzed with TemplateClassWithItemCount as the closure scope and $this->itemCount is handled without a false positive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100