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