MATCH (class)-[:SUB_IMPLEMENTS]->()-[:HAS]->(interfaceName) RETURN namespaceName.allParts, className.allParts, parentName.allParts, collect(interfaceName.allParts) „Ermittle aus den AST‘s aller importierten Dateien alle deklarierten PHP-Klassen und ihre Vererbungshierarchie“
type name=Mw\Example\Wheel interface name=Mw\Example\Vehicle type name=Mw\Example\Vehicle file name=src/Mw/Example/Vehicle.php package name=mw/example CONTAINS_FILE DEFINED_IN DEFINED_IN DEFINED_IN IS IS IS property name=wheels visibility=private
heraus, generiere eine USES-Beziehung zwischen den beiden Klassen“ MATCH (name:Name)<-[:SUB {type: "class"}]-(call:Expr_StaticCall) <-[:SUB|HAS*]-(:Stmt_ClassMethod) <-[:HAS]-() <-[:SUB {type: "stmts"}]-(:Stmt_Class) <-[:DEFINED_IN]-(c:Class) WHERE call.class <> "parent" AND name.fullName IS NOT NULL MATCH (t:Type {name: name.fullName}) MERGE (c)-[:USES]->(t)
eine DEPENDS_ON-Beziehung zwischen diesen beiden Paketen“ MATCH (p1:Package)-[:CONTAINS_FILE]->(:File) -[:HAS|SUB*]->() <-[:DEFINED_IN]-(user) -[:USES]->(:Type) -[:IS]->(usee) -[:DEFINED_IN]->() <-[:HAS|SUB*]-(:File) <-[:CONTAINS_FILE]-(p2:Package) WHERE (user:Class OR user:Interface OR user:Trait) AND (usee:Class OR usee:Interface OR usee:Trait) AND p1 <> p2 MERGE (p1)-[:DEPENDS_ON]->(p2)