Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
TaxStatus
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
6
100.00% covered (success)
100.00%
1 / 1
 label
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
6
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Tax\Domain\ValueObject;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11/**
12 * Enumeration representing legal tax status for fiscal and accounting reporting.
13 */
14enum TaxStatus: string
15{
16    case STANDARD = 'standard';
17    case ZERO_RATED = 'zero_rated';
18    case EXEMPT = 'exempt';
19    case REVERSE_CHARGE = 'reverse_charge';
20    case OUT_OF_SCOPE = 'out_of_scope';
21
22    /**
23     * Get human-readable label for legal tax status.
24     */
25    public function label(): string
26    {
27        return match ($this) {
28            self::STANDARD => 'Standard Rate',
29            self::ZERO_RATED => 'Zero Rated (0%)',
30            self::EXEMPT => 'Exempt (ZW)',
31            self::REVERSE_CHARGE => 'Reverse Charge (NP/OO)',
32            self::OUT_OF_SCOPE => 'Out of Scope',
33        };
34    }
35}