[question] How to list all classes that used in a file?

Open
#232 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
20/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
tooling

Research direction

The issue names no files, tests, or entry points. Clarify whether documentation or an API change is wanted, and define the expected behavior for the Book and Utils examples before implementation.

Written by the indexing model from the issue text.

Description

For example:

class MyKlass {
    public function createBook()
    {
        $book = new Book();

        return $book;
    }

    public function formatter()
    {
        $formatter = Utils::getFormatter();

        return $formatter;
    }
}

How to print list of class usage of that file?
In this example expected output will be: "Book" and "Utils" class.
Thanks

Dominant language
PHP
Stars
984
Forks
81
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from nikic/php-ast

All issues in nikic/php-ast

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.