| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | final class GraphNetwork |
||
| 11 | { |
||
| 12 | private $nodes; |
||
| 13 | |||
| 14 | private function __construct(Node ...$locations) |
||
| 17 | } |
||
| 18 | |||
| 19 | public static function create(): self |
||
| 22 | } |
||
| 23 | |||
| 24 | public function withVertex( |
||
| 25 | string $label, |
||
| 26 | EdgeDefinition $edges |
||
| 27 | ): self { |
||
| 28 | return new self(...array_merge( |
||
| 29 | $this->nodes, |
||
| 30 | [Node::labeled($label, $edges->gather())] |
||
| 31 | )); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function make(): Network |
||
| 37 | } |
||
| 38 | } |
||
| 39 |