Exakat\Analyzer\Files\IsComponent::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $inert = '.not(hasLabel("Use", "Class", "Const", "Interface", "Trait", "Include", "Global", "Static", "Void"))
                  .where( __.hasLabel("Functioncall").has("fullnspath", "\\\\define").count().is(eq(0)) )
                  .where( __.hasLabel("Functioncall").filter{ it.get().value("token") in ["T_INCLUDE", "T_INCLUDE_ONCE", "T_REQUIRE_ONCE", "T_REQUIRE"] }.count().is(eq(0)) )
                  .where( __.hasLabel("Function").where( __.out("NAME").hasLabel("Void").count().is(eq(0))).count().is(eq(0)) )
                             ';
        $inertWithIfthen = $inert . '
                  .where( __.hasLabel("Ifthen").where( __.out("THEN", "ELSE").out("ELEMENT")' . $inert . '.count().is(eq(0)) ).count().is(eq(0)) )';
        $this->atomIs('File')->outIs('FILE')->outIs('ELEMENT')->outIs('CODE')->raw('coalesce(__.out("ELEMENT").hasLabel("Namespace").out("BLOCK"),  __.filter{true} )')->raw('where( __.out("ELEMENT")' . $inertWithIfthen . '.count().is(eq(0)) )
             ')->back('first');
        $this->prepareQuery();
        //
    }
IsComponent