From ddee65cfec91714ba37704b84ad68f9b2b8e8ec4 Mon Sep 17 00:00:00 2001 From: Jasper Zonneveld Date: Fri, 31 May 2024 14:40:08 +0200 Subject: [PATCH] feat: add RAIL to TransportMode enum --- CHANGELOG.md | 1 + src/Enums/TransportMode.php | 3 +++ tests/_files/situations-schema.json | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3460c2e..721a93a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi ### Added - Add changedById to Contact. +- Add RAIL to TransportMode enum. ### Changed - Drop PHP <8.1 support. diff --git a/src/Enums/TransportMode.php b/src/Enums/TransportMode.php index 9c8bbf9..8fe23ce 100644 --- a/src/Enums/TransportMode.php +++ b/src/Enums/TransportMode.php @@ -11,6 +11,7 @@ * @method static TransportMode BIKE() * @method static TransportMode WALK() * @method static TransportMode BOAT() + * @method static TransportMode RAIL() */ final class TransportMode extends Enum { @@ -18,6 +19,7 @@ final class TransportMode extends Enum private const BIKE = 'BIKE'; private const WALK = 'WALK'; private const BOAT = 'BOAT'; + private const RAIL = 'RAIL'; public function getLabel(): string { @@ -26,6 +28,7 @@ public function getLabel(): string 'BIKE' => '(snor)Fiets', 'WALK' => 'Voetganger', 'BOAT' => 'Vaartuig', + 'RAIL' => 'Trein', ][$this->getKey()]; } } diff --git a/tests/_files/situations-schema.json b/tests/_files/situations-schema.json index 6017d0d..60a81f9 100644 --- a/tests/_files/situations-schema.json +++ b/tests/_files/situations-schema.json @@ -1029,7 +1029,8 @@ "CAR", "BIKE", "WALK", - "BOAT" + "BOAT", + "RAIL" ], "title": "TransportMode" },