From 96e01fb954a7b4df7779293565cea94db66efa27 Mon Sep 17 00:00:00 2001 From: Jasper Zonneveld Date: Mon, 9 Sep 2024 09:02:35 +0200 Subject: [PATCH] feat: add BUS to TransportMode enum --- CHANGELOG.md | 4 +++- src/Enums/TransportMode.php | 3 +++ tests/_files/situations-schema.json | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b66bd49..2959b97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to `swisnl\melvin` will be documented in this file. Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles. ## Unreleased -- Nothing. + +### Added +- Add BUS to TransportMode enum. ## [1.5.1] - 2024-07-23 diff --git a/src/Enums/TransportMode.php b/src/Enums/TransportMode.php index 8fe23ce..5559637 100644 --- a/src/Enums/TransportMode.php +++ b/src/Enums/TransportMode.php @@ -12,6 +12,7 @@ * @method static TransportMode WALK() * @method static TransportMode BOAT() * @method static TransportMode RAIL() + * @method static TransportMode BUS() */ final class TransportMode extends Enum { @@ -20,6 +21,7 @@ final class TransportMode extends Enum private const WALK = 'WALK'; private const BOAT = 'BOAT'; private const RAIL = 'RAIL'; + private const BUS = 'BUS'; public function getLabel(): string { @@ -29,6 +31,7 @@ public function getLabel(): string 'WALK' => 'Voetganger', 'BOAT' => 'Vaartuig', 'RAIL' => 'Trein', + 'BUS' => 'Bus', ][$this->getKey()]; } } diff --git a/tests/_files/situations-schema.json b/tests/_files/situations-schema.json index 952dab2..de9f7b5 100644 --- a/tests/_files/situations-schema.json +++ b/tests/_files/situations-schema.json @@ -1031,7 +1031,8 @@ "BIKE", "WALK", "BOAT", - "RAIL" + "RAIL", + "BUS" ], "title": "TransportMode" },