File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,12 @@ public function export(NodeInterface $node): OriginalGraph
30
30
31
31
foreach ($ node ->all () as $ node_visited ) {
32
32
/** @var int $vertexId */
33
- $ vertexId = $ this ->createVertexId ($ node_visited );
34
- $ this ->createVertex ($ node_visited );
33
+ $ vertexFrom = $ this ->createVertex ($ node_visited );
35
34
36
- if (null === $ parent = $ node_visited ->getParent ()) {
37
- continue ;
35
+ foreach ($ node_visited ->children () as $ child ) {
36
+ $ vertexTo = $ this ->createVertex ($ child );
37
+ $ vertexFrom ->createEdgeTo ($ vertexTo );
38
38
}
39
-
40
- /** @var int $hash_parent */
41
- $ hash_parent = $ this ->createVertexId ($ parent );
42
- $ this ->createVertex ($ parent );
43
-
44
- $ this ->getGraph ()->getVertex ($ hash_parent )->createEdgeTo ($ this ->getGraph ()->getVertex ($ vertexId ));
45
39
}
46
40
47
41
return $ this ->getGraph ();
You can’t perform that action at this time.
0 commit comments