Skip to content

Commit cbfe6fb

Browse files
committed
Use plain arrays instead of Edges and Vertices containers
Refs graphp/graph#195
1 parent 70ca5f6 commit cbfe6fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"require": {
1212
"php": ">=5.3.0",
13-
"graphp/graph": "dev-master#a9d8cfc as 1.0.0"
13+
"graphp/graph": "dev-master#214de45 as 1.0.0"
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"

src/GraphViz.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function createScript(Graph $graph)
305305
$vid = $vids[\spl_object_hash($vertex)];
306306
$layout = $this->getLayoutVertex($vertex, $vid);
307307

308-
if ($layout || $vertex->getEdges()->isEmpty()) {
308+
if ($layout || !$vertex->getEdges()) {
309309
$script .= $this->formatIndent . $this->escape($vid);
310310
if ($layout) {
311311
$script .= ' ' . $this->escapeAttributes($layout);
@@ -319,7 +319,7 @@ public function createScript(Graph $graph)
319319

320320
// add all edges as directed edges
321321
foreach ($graph->getEdges() as $currentEdge) {
322-
$both = $currentEdge->getVertices()->getVector();
322+
$both = $currentEdge->getVertices();
323323
$currentStartVertex = $both[0];
324324
$currentTargetVertex = $both[1];
325325

0 commit comments

Comments
 (0)