| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 63.64% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class SimpleWeightedGraph extends SimpleGraph |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Create a new simple graph |
||
| 18 | * |
||
| 19 | * @param string $edgeClass - the edge class |
||
| 20 | * @param SupplierInterface $vertexSupplier - the vertex supplier |
||
| 21 | * @param SupplierInterface $edgeSupplier - the edge supplier |
||
| 22 | * @param bool $weighted - if the graph is weighted |
||
| 23 | */ |
||
| 24 | 3 | public function __construct( |
|
| 25 | ?string $edgeClass = null, |
||
| 26 | ?SupplierInterface $vertexSupplier = null, |
||
| 27 | ?SupplierInterface $edgeSupplier = null, |
||
| 28 | ?bool $weighted = null |
||
| 29 | ) { |
||
| 30 | 3 | parent::__construct( |
|
| 31 | 3 | $edgeClass, |
|
| 32 | 3 | $vertexSupplier, |
|
| 33 | 3 | $edgeSupplier, |
|
| 34 | 3 | true |
|
| 35 | ); |
||
| 36 | 3 | } |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Create a simple graph builder |
||
| 40 | * |
||
| 41 | * @param string $edgeClass - the edge class |
||
| 42 | * @param SupplierInterface $edgeSupplier - the edge supplier |
||
| 43 | * |
||
| 44 | * @return GraphBuilder |
||
| 45 | */ |
||
| 46 | public function createBuilder(?string $edgeClass = null, ?SupplierInterface $edgeSupplier = null): GraphBuilder |
||
| 52 | } |
||
| 53 | } |
||
| 54 |