File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class InTree extends DirectedTree
25
25
public function getVerticesChildren (Vertex $ vertex )
26
26
{
27
27
$ vertices = $ vertex ->getVerticesEdgeFrom ();
28
- if (count ( $ vertices) !== $ this -> degree -> getDegreeInVertex ( $ vertex )) {
28
+ if ($ vertices-> hasDuplicates ( )) {
29
29
throw new UnexpectedValueException ();
30
30
}
31
31
@@ -35,7 +35,7 @@ public function getVerticesChildren(Vertex $vertex)
35
35
protected function getVerticesParent (Vertex $ vertex )
36
36
{
37
37
$ vertices = $ vertex ->getVerticesEdgeTo ();
38
- if (count ( $ vertices) !== $ this -> degree -> getDegreeOutVertex ( $ vertex )) {
38
+ if ($ vertices-> hasDuplicates ( )) {
39
39
throw new UnexpectedValueException ();
40
40
}
41
41
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class OutTree extends DirectedTree
25
25
public function getVerticesChildren (Vertex $ vertex )
26
26
{
27
27
$ vertices = $ vertex ->getVerticesEdgeTo ();
28
- if (count ( $ vertices) !== $ this -> degree -> getDegreeOutVertex ( $ vertex )) {
28
+ if ($ vertices-> hasDuplicates ( )) {
29
29
throw new UnexpectedValueException ();
30
30
}
31
31
@@ -35,7 +35,7 @@ public function getVerticesChildren(Vertex $vertex)
35
35
protected function getVerticesParent (Vertex $ vertex )
36
36
{
37
37
$ vertices = $ vertex ->getVerticesEdgeFrom ();
38
- if (count ( $ vertices) !== $ this -> degree -> getDegreeInVertex ( $ vertex )) {
38
+ if ($ vertices-> hasDuplicates ( )) {
39
39
throw new UnexpectedValueException ();
40
40
}
41
41
You can’t perform that action at this time.
0 commit comments