TaxType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 10
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A description() 0 7 1
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
}