Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | class GraphBuilder |
||
14 | { |
||
15 | /** |
||
16 | * The graph |
||
17 | * |
||
18 | * @var GraphInterface |
||
19 | */ |
||
20 | private $graph; |
||
21 | |||
22 | /** |
||
23 | * Construct the graph |
||
24 | * |
||
25 | * @param GraphInterface $graph - the graph |
||
26 | */ |
||
27 | public function __construct(GraphInterface $graph) |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Add a vertex to the graph being built |
||
34 | * |
||
35 | * @param VertexInterface $vertex - the vertex |
||
36 | */ |
||
37 | public function addVertex(VertexInterface $vertex): self |
||
38 | { |
||
39 | $this->graph->addVertex($vertex); |
||
40 | return $this; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Add vertices to the graph being built |
||
45 | * |
||
46 | * @param VertexInterface $vertex - the vertex |
||
47 | */ |
||
48 | public function addVertices(array $vertices): self |
||
54 | } |
||
55 | } |
||
56 |