We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
Currently i found: Stmt_Class, Expr_StaticCall, Name_FullyQualified and Expr_New to able to find class usage.
Stmt_Class
Expr_StaticCall
Name_FullyQualified
Expr_New
Any other possible keyword to check? Thanks
Sorry, something went wrong.
There's a lot of them - there's also AST_USE/AST_GROUP_USE which would tell you what use Xyz\Foo; meant Foo was.
AST_USE
AST_GROUP_USE
use Xyz\Foo;
Foo
You may want to use a static analyzer instead, e.g. https://github.com/phan/phan
For example, https://github.com/phan/phan/blob/5.2.1/tool/pdep#L20-L54 would print the full dependency graph of classes
Are you thinking of https://github.com/nikic/php-parser and https://github.com/nikic/PHP-Parser/tree/master/lib/PhpParser/Node/Stmt
No branches or pull requests
For example:
How to print list of class usage of that file?
In this example expected output will be: "Book" and "Utils" class.
Thanks
The text was updated successfully, but these errors were encountered: