Skip to content

Commit

Permalink
Update enum.stub
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrulhazim authored Nov 27, 2024
1 parent 4715d8b commit f318396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stubs/enum.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ namespace {{ namespace }};
use CleaniqueCoders\Traitify\Contracts\Enum as Contract;
use CleaniqueCoders\Traitify\Concerns\InteractsWithEnum;

enum {{ class }} implements Contract
enum {{ class }}: string implements Contract
{
use InteractsWithEnum;

case EXAMPLE; // Add actual cases here
case EXAMPLE = 'example';

public function label(): string
{
return match ($this) {
self::EXAMPLE => 'Example Label',
self::EXAMPLE => 'Example Label',
};
}

Expand Down

0 comments on commit f318396

Please sign in to comment.