analyze()
analyze(\Closure $closure) : array
Analyzer a given closure.
Parameters
\Closure | $closure |
Throws
- \SuperClosure\Exception\ClosureAnalysisException
This is the AST based analyzer.
We're using reflection and AST-based code parser to analyze a closure and determine its code and context using the nikic/php-parser library. The AST based analyzer and has more capabilities than the token analyzer, but is, unfortunately, about 25 times slower.
getFileAst(\ReflectionFunction $reflection) : array<mixed,\PhpParser\Node>
\ReflectionFunction | $reflection |
getParser() : \PhpParser\Parser