| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Vertex implements VertexInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var non-empty-string vertex's id |
||
|
|
|||
| 15 | */ |
||
| 16 | protected string $id; |
||
| 17 | /** |
||
| 18 | * @var non-empty-string vertex's type |
||
| 19 | */ |
||
| 20 | protected string $type; |
||
| 21 | /** |
||
| 22 | * @var mixed custom extra data |
||
| 23 | */ |
||
| 24 | protected $data; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Vertex constructor |
||
| 28 | * @param non-empty-string $id vertex's id |
||
| 29 | * @param non-empty-string $type vertex's type |
||
| 30 | * @param mixed $data custom extra data |
||
| 31 | */ |
||
| 32 | public function __construct(string $id, string $type, $data = null) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @inheritDoc |
||
| 41 | */ |
||
| 42 | public function getId(): string |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | */ |
||
| 50 | public function getType(): string |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return mixed |
||
| 57 | */ |
||
| 58 | public function getData() |
||
| 63 |