TaxScheme   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 29
dl 0
loc 63
rs 10
c 0
b 0
f 0
wmc 12

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setIDAttributes() 0 3 1
A getID() 0 2 1
A setID() 0 3 1
A setName() 0 3 1
A setTaxTypeCode() 0 3 1
A setIDAttribute() 0 3 1
A getIDAttributes() 0 2 1
A getTaxTypeCode() 0 2 1
A xmlSerialize() 0 14 3
A getName() 0 2 1
1
<?php
2
3
/**
4
 * MÓDULO DE EMISIÓN ELECTRÓNICA F72X
5
 * UBL 2.1
6
 * Version 1.0
7
 * 
8
 * Copyright 2019, Jaime Cruz
9
 */
10
11
namespace F72X\UblComponent;
12
13
use Sabre\Xml\Writer;
14
15
class TaxScheme extends BaseComponent {
16
17
    protected $ID;
18
    protected $IDAttributes = [];
19
    protected $Name;
20
    protected $TaxTypeCode;
21
22
    function xmlSerialize(Writer $writer) {
23
        $writer->write([
24
            'name'          => SchemaNS::CBC . 'ID',
25
            'value'         => $this->ID,
26
            'attributes'    => $this->IDAttributes
27
        ]);
28
        if (!is_null($this->Name)) {
29
            $writer->write([
30
                SchemaNS::CBC . 'Name' => $this->Name
31
            ]);
32
        }
33
        if (!is_null($this->TaxTypeCode)) {
34
            $writer->write([
35
                SchemaNS::CBC . 'TaxTypeCode' => $this->TaxTypeCode
36
            ]);
37
        }
38
    }
39
40
    public function getID() {
41
        return $this->ID;
42
    }
43
44
    public function setID($ID) {
45
        $this->ID = $ID;
46
        return $this;
47
    }
48
    public function getIDAttributes() {
49
        return $this->IDAttributes;
50
    }
51
52
    public function setIDAttributes($IDAtt) {
53
        $this->IDAttributes = $IDAtt;
54
        return $this;
55
    }
56
57
    public function setIDAttribute($attribute, $value) {
58
        $this->IDAttributes[$attribute] = $value;
59
        return $this;
60
    }
61
62
    public function getName() {
63
        return $this->Name;
64
    }
65
66
    public function setName($Name) {
67
        $this->Name = $Name;
68
        return $this;
69
    }
70
71
    public function getTaxTypeCode() {
72
        return $this->TaxTypeCode;
73
    }
74
75
    public function setTaxTypeCode($TaxTypeCode) {
76
        $this->TaxTypeCode = $TaxTypeCode;
77
        return $this;
78
    }
79
80
}
81