| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | private function findVertex(string $key): Vertex |
||
| 53 | { |
||
| 54 | $vertices = array_filter($this->converterGraph->getVertices()->getVector(), function (Vertex $vertex) use ($key) { |
||
| 55 | return $vertex->getId() === $key; |
||
| 56 | }); |
||
| 57 | |||
| 58 | if (1 !== \count($vertices)) { |
||
| 59 | throw new \RuntimeException('did not find vertex by '.$key); |
||
| 60 | } |
||
| 61 | |||
| 62 | return array_pop($vertices); |
||
| 63 | } |
||
| 65 |