MappingSource.php

Code Hygiene Score: 100

Keine Issues gefunden.

Klassen 1

Funktionen 3

Verwendet von 2

Code

<?php

declare(strict_types=1);

namespace Domain\ValueObject;

// @responsibility: Quelle eines Taxonomie-Mappings (automatisch vs. manuell)

enum MappingSource: string
{
    case AUTO = 'auto';
    case MANUAL = 'manual';

    public function isAutomatic(): bool
    {
        return $this === self::AUTO;
    }

    public function isManual(): bool
    {
        return $this === self::MANUAL;
    }

    public function label(): string
    {
        return match ($this) {
            self::AUTO => 'Automatisch',
            self::MANUAL => 'Manuell',
        };
    }
}
← Übersicht Graph