| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | final class Digraph |
||
| 14 | { |
||
| 15 | /** @var HasDotRepresentation[] */ |
||
| 16 | private array $elements; |
||
| 17 | |||
| 18 | 27 | public function __construct() |
|
| 19 | { |
||
| 20 | 27 | $this->elements = []; |
|
| 21 | } |
||
| 22 | |||
| 23 | /** @param HasDotRepresentation[] $definitions */ |
||
| 24 | 23 | public function add(array $definitions): void |
|
| 25 | { |
||
| 26 | 23 | $this->elements = array_merge($this->elements, $definitions); |
|
| 27 | } |
||
| 28 | |||
| 29 | /** @return HasDotRepresentation[] */ |
||
| 30 | 26 | public function elements(): array |
|
| 31 | { |
||
| 32 | 26 | return $this->elements; |
|
| 33 | } |
||
| 34 | |||
| 35 | 26 | public function id(): string |
|
| 38 | } |
||
| 39 | } |
||
| 40 |