Skip to content

Commit

Permalink
feat: add BUS to TransportMode enum
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Sep 9, 2024
1 parent 5cb9775 commit 96e01fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions src/Enums/TransportMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand All @@ -29,6 +31,7 @@ public function getLabel(): string
'WALK' => 'Voetganger',
'BOAT' => 'Vaartuig',
'RAIL' => 'Trein',
'BUS' => 'Bus',
][$this->getKey()];
}
}
3 changes: 2 additions & 1 deletion tests/_files/situations-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,8 @@
"BIKE",
"WALK",
"BOAT",
"RAIL"
"RAIL",
"BUS"
],
"title": "TransportMode"
},
Expand Down

0 comments on commit 96e01fb

Please sign in to comment.