While using an AggregateSourceLocater( ComposerSourceLocator, DirectoriesSourceLocator ) I'm unable to find the following closure when calling reflectAllFunctions
<?php
// scan-me/function.php
return function() {
};
I can find find the following using reflectAllClasses():
<?php
// scan-me/class.php
return new class {
};
While debugging if I had set this up correctly, I ended up at the FindReflectionsInTree class and it was here that I noticed that it only looks for Node\Stmt\Function_, if I add Node\Expr\Closure, the closure is found. It appears to also be missing Node\Expr\ArrowFunction.