| Total Complexity | 8 |
| Total Lines | 80 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Stop implements SlugAware |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $id; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $name; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $slug; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var StopTime[] |
||
| 30 | */ |
||
| 31 | private $times = []; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Stop constructor. |
||
| 35 | * @param int $id |
||
| 36 | * @param string $name |
||
| 37 | * @param string $slug |
||
| 38 | * @param StopTime[] $times |
||
| 39 | */ |
||
| 40 | public function __construct(int $id, string $name, string $slug, array $times) |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | public function getId(): int |
||
| 52 | { |
||
| 53 | return $this->id; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getName(): string |
||
| 60 | { |
||
| 61 | return $this->name; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getSlug(): string |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return StopTime[] |
||
| 74 | */ |
||
| 75 | public function getTimes(): array |
||
| 76 | { |
||
| 77 | return $this->times; |
||
| 78 | } |
||
| 79 | |||
| 80 | |||
| 81 | public function getNearStopTime(StopTime $currentTime): ?StopTime |
||
| 90 | } |
||
| 91 | } |
||
| 92 |