15
15
/**
16
16
* Class Gv.
17
17
*/
18
- final class Gv extends AbstractExporter
18
+ final class Gv implements ExporterInterface
19
19
{
20
20
/**
21
21
* The graph attributes.
@@ -136,7 +136,7 @@ public function setGraphAttributes(array $attributes): self
136
136
* @return string
137
137
* The attributes as string.
138
138
*/
139
- protected function attributesArrayToText (array $ attributes ): string
139
+ private function attributesArrayToText (array $ attributes ): string
140
140
{
141
141
$ attributesText = array_filter (
142
142
array_map (
@@ -166,7 +166,7 @@ static function ($key, $value) {
166
166
* @return Generator<NodeInterface, NodeInterface>
167
167
* Yield the parent and child node.
168
168
*/
169
- protected function findEdges (NodeInterface $ node ): iterable
169
+ private function findEdges (NodeInterface $ node ): iterable
170
170
{
171
171
foreach ($ node ->children () as $ child ) {
172
172
yield $ node => $ child ;
@@ -186,7 +186,7 @@ protected function findEdges(NodeInterface $node): iterable
186
186
* @return string
187
187
* The content of the .gv file.
188
188
*/
189
- protected function getGv (string $ attributes = '' , string $ nodes = '' , string $ edges = '' ): string
189
+ private function getGv (string $ attributes = '' , string $ nodes = '' , string $ edges = '' ): string
190
190
{
191
191
$ graphType = $ this ->getDirected () ?
192
192
'digraph ' :
@@ -215,7 +215,7 @@ protected function getGv(string $attributes = '', string $nodes = '', string $ed
215
215
* @return string
216
216
* The hash of the node.
217
217
*/
218
- protected function getHash (NodeInterface $ node ): string
218
+ private function getHash (NodeInterface $ node ): string
219
219
{
220
220
return sha1 (spl_object_hash ($ node ));
221
221
}
@@ -229,10 +229,10 @@ protected function getHash(NodeInterface $node): string
229
229
* @return array<mixed, mixed>
230
230
* The attributes as an array.
231
231
*/
232
- protected function getNodeAttributes (NodeInterface $ node ): array
232
+ private function getNodeAttributes (NodeInterface $ node ): array
233
233
{
234
234
$ attributes = [
235
- 'label ' => $ this -> getNodeRepresentation ( $ node ),
235
+ 'label ' => $ node -> label ( ),
236
236
];
237
237
238
238
if ($ node instanceof AttributeNodeInterface) {
0 commit comments