Skip to content
New issue

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

Make AST map aware of custom function calls #902

Merged
merged 5 commits into from
Jun 23, 2022
Merged

Make AST map aware of custom function calls #902

merged 5 commits into from
Jun 23, 2022

Conversation

patrickkusebauch
Copy link
Collaborator

@patrickkusebauch patrickkusebauch commented Jun 6, 2022

Fixes #637

@patrickkusebauch patrickkusebauch changed the title Make AST map aware of function calls Make AST map aware of custom function calls Jun 7, 2022

$token = $dependency->getToken();
assert($token instanceof FunctionLikeToken);
if (null === $astMap->getFunctionReferenceForToken($token)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't know about it, it means it is either a non-existing function (not up to us to warn users about it, other SA tools are better suited for it) or it is a PHP internal function

Copy link
Collaborator

@dbrumann dbrumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thank you.

@dbrumann dbrumann merged commit ba85bb6 into qossmic:main Jun 23, 2022
@patrickkusebauch patrickkusebauch deleted the feature/function_dependencies branch June 24, 2022 20:58
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.

Tracking custom function calls
2 participants