bool FileScope::addClass(AnalysisResultConstPtr ar, ClassScopePtr classScope) { if (ar->declareClass(classScope)) { m_classes[classScope->getScopeName()].push_back(classScope); return true; } return false; }
bool AnalysisResult::declareClass(ClassScopePtr classScope) const { assert(m_phase < AnalyzeAll); // System classes override if (m_systemClasses.count(classScope->getScopeName())) { // we need someone to hold on to a reference to it // even though we're not going to do anything with it this->lock()->m_ignoredScopes.push_back(classScope); return false; } return true; }
bool FunctionScope::isConstructor(ClassScopePtr cls) const { return m_stmt && cls && (isNamed("__construct") || (cls->classNameCtor() && isNamed(cls->getScopeName()))); }