| Total Complexity | 9 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 7 | final class Location implements GeometricVertex |
||
| 8 | { |
||
| 9 | private $position; |
||
| 10 | private $label; |
||
| 11 | private $edges; |
||
| 12 | |||
| 13 | private function __construct(Position $position, string $label, Edges $edges) |
||
| 18 | } |
||
| 19 | |||
| 20 | public static function at( |
||
| 21 | Position $position, |
||
| 22 | string $label, |
||
| 23 | Edges $edges = null |
||
| 24 | ): GeometricVertex { |
||
| 25 | return new self($position, $label, $edges ?: Roads::none()); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function position(): Position |
||
| 29 | { |
||
| 30 | return $this->position; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function label(): string |
||
| 36 | } |
||
| 37 | |||
| 38 | public function edges(): Edges |
||
| 39 | { |
||
| 40 | return $this->edges; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function hasNegativeEdges(): bool |
||
| 51 | } |
||
| 52 | } |
||
| 53 |