TaxType::description()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Squareetlabs\VeriFactu\Enums;
6
7
enum TaxType: string
8
{
9
    case VAT = '01';
10
    case IPSI = '02';
11
    case IGIC = '03';
12
    case OTHER = '05';
13
14
    public function description(): string
15
    {
16
        return match($this) {
17
            self::VAT => 'Value Added Tax (VAT)',
18
            self::IPSI => 'Production, Services and Import Tax (IPSI) of Ceuta and Melilla',
19
            self::IGIC => 'Canary Islands General Indirect Tax (IGIC)',
20
            self::OTHER => 'Other taxes',
21
        };
22
    }
23
}