henzeb/enumhancer

View on GitHub
src/Concerns/Labels.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Henzeb\Enumhancer\Concerns;

use Henzeb\Enumhancer\Helpers\EnumLabels;

trait Labels
{
    public static function labels(): array
    {
        return EnumLabels::getConfiguredLabels(self::class);
    }

    public function label(): ?string
    {
        return EnumLabels::getLabel($this);
    }
}