@Test public void nested_function() { CompilationUnitTree cut = parseSource("<?php namespace N {\n" + "g();\n" + "f();\n" + "function f() {" + " function g() {}" + "}" + "}"); SymbolTableImpl symbolTable = SymbolTableImpl.create(cut); assertFunctionSymbols(symbolTable, "n\\f", "n\\g"); assertSymbolUsages(symbolTable, "n\\f", 3); assertSymbolUsages(symbolTable, "n\\g", 2); }
public static SymbolTableImpl create(CompilationUnitTree compilationUnit) { return create(compilationUnit, new ProjectSymbolData(), null); }
SymbolTableImpl implements SymbolTable { public static SymbolTableImpl create(CompilationUnitTree compilationUnit) { return create(compilationUnit, new ProjectSymbolData(), null); } }
SymbolTableImpl implements SymbolTable { public static SymbolTableImpl create(CompilationUnitTree compilationUnit) { return create(compilationUnit, new ProjectSymbolData(), null); } private  SymbolTableImpl(); }
SymbolTableImpl implements SymbolTable { public static SymbolTableImpl create(CompilationUnitTree compilationUnit) { return create(compilationUnit, new ProjectSymbolData(), null); } private  SymbolTableImpl(); static SymbolTableImpl create(CompilationUnitTree compilationUnit); static SymbolTableImpl create(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, @Nullable PhpFile file); @Override ImmutableSet<Scope> getScopes(); @Nullable @Override Scope getScopeFor(Tree tree); ImmutableList<Symbol> getSymbols(); @Override List<Symbol> getSymbols(Symbol.Kind kind); List<Symbol> getSymbols(String name); @Override @CheckForNull Symbol getSymbol(Tree tree); Collection<ClassSymbolData> classSymbolDatas(); Collection<FunctionSymbolData> functionSymbolDatas(); }
SymbolTableImpl implements SymbolTable { public static SymbolTableImpl create(CompilationUnitTree compilationUnit) { return create(compilationUnit, new ProjectSymbolData(), null); } private  SymbolTableImpl(); static SymbolTableImpl create(CompilationUnitTree compilationUnit); static SymbolTableImpl create(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, @Nullable PhpFile file); @Override ImmutableSet<Scope> getScopes(); @Nullable @Override Scope getScopeFor(Tree tree); ImmutableList<Symbol> getSymbols(); @Override List<Symbol> getSymbols(Symbol.Kind kind); List<Symbol> getSymbols(String name); @Override @CheckForNull Symbol getSymbol(Tree tree); Collection<ClassSymbolData> classSymbolDatas(); Collection<FunctionSymbolData> functionSymbolDatas();  }