We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb4efa8 commit 0b1717dCopy full SHA for 0b1717d
tests/src/Exporter/KeyValueGraph.php
@@ -4,14 +4,15 @@
4
5
namespace drupol\phptree\tests\Exporter;
6
7
+use drupol\phptree\Exporter\Graph;
8
use drupol\phptree\Node\KeyValueNodeInterface;
9
use drupol\phptree\Node\NodeInterface;
10
use Fhaculty\Graph\Vertex;
11
12
/**
13
* Class KeyValueGraph.
14
*/
-class KeyValueGraph extends ValueGraph
15
+class KeyValueGraph extends Graph
16
{
17
18
* {@inheritdoc}
@@ -21,7 +22,7 @@ protected function createVertex(NodeInterface $node): Vertex
21
22
$vertex = parent::createVertex($node);
23
24
if ($node instanceof KeyValueNodeInterface) {
- $vertex->setAttribute('graphviz.label', $node->getValue());
25
+ $vertex->setAttribute('graphviz.label', $node->getKey() . $vertex->getAttribute('graphviz.label'));
26
}
27
28
return $vertex;
0 commit comments