Skip to content

Commit 3af5b4a

Browse files
committed
Ignore coverage for unreachable code
1 parent 7d00d6d commit 3af5b4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Parallel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Fhaculty\Graph\Algorithm\BaseGraph;
66
use Fhaculty\Graph\Edge\Base as Edge;
77
use Fhaculty\Graph\Graph;
8+
use LogicException;
89

910
/**
1011
* Basic algorithms for working with parallel edges
@@ -70,8 +71,11 @@ public function getEdgesParallelEdge(Edge $edge)
7071
}
7172

7273
$pos = array_search($edge, $edges, true);
74+
7375
if ($pos === false) {
76+
// @codeCoverageIgnoreStart
7477
throw new LogicException('Internal error: Current edge not found');
78+
// @codeCoverageIgnoreEnd
7579
}
7680

7781
// exclude current edge from parallel edges

0 commit comments

Comments
 (0)