phan / phan/phan

Support `@phan-closure-scope` in the global scope, for `$this`

Open
#1,711 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.