Skip to content

Commit

Permalink
Make enum comparable (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark authored Oct 14, 2024
1 parent fcf9b26 commit 0d4830e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"require": {
"php": ">=8.3",
"oskarstark/enum-helper": "^1.5",
"oskarstark/trimmed-non-empty-string": "^1.1",
"psr/log": "^3.0",
"symfony/cache": "^7.0",
Expand Down
4 changes: 4 additions & 0 deletions src/Domain/Value/Dto/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@

namespace SensioLabs\Storyblok\Api\Domain\Value\Dto;

use OskarStark\Enum\Trait\Comparable;

/**
* @author Silas Joisten <silasjoisten@proton.me>
*/
enum Version: string
{
use Comparable;

case Published = 'published';
case Draft = 'draft';
}

0 comments on commit 0d4830e

Please sign in to comment.