mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-18 12:48:41 +00:00
Update Graph.php
This commit is contained in:
parent
1bf1e6da3b
commit
65e0a5d024
|
|
@ -68,6 +68,8 @@ class Graph
|
|||
*/
|
||||
public function addNodeRelative(Node $relative, Node $node) : Graph
|
||||
{
|
||||
$this->edges[] = new Edge($relative, $node);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
@ -199,10 +201,6 @@ class Graph
|
|||
*/
|
||||
public function getNeighbors($node) : array
|
||||
{
|
||||
if (!($node instanceof Node)) {
|
||||
$node = $this->getNode($node);
|
||||
}
|
||||
|
||||
$edges = $this->getEdgesOfNode($node);
|
||||
$neighbors = [];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user