Party::getPartyIdentification()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 1
b 0
f 0
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 Party extends BaseComponent {
16
17
    /** @var PartyIdentification */
18
    protected $PartyIdentification;
19
20
    /** @var PartyName */
21
    protected $PartyName;
22
23
    /** @var PartyTaxScheme */
24
    protected $PartyTaxScheme;
25
26
    /** @var PartyLegalEntity */
27
    protected $PartyLegalEntity;
28
29
    function xmlSerialize(Writer $writer) {
30
        if ($this->PartyIdentification) {
31
            $writer->write([
32
                SchemaNS::CAC . 'PartyIdentification' => $this->PartyIdentification
33
            ]);
34
        }
35
        if ($this->PartyName) {
36
            $writer->write([
37
                SchemaNS::CAC . 'PartyName' => $this->PartyName
38
            ]);
39
        }
40
        if ($this->PartyTaxScheme) {
41
            $writer->write([
42
                SchemaNS::CAC . 'PartyTaxScheme' => $this->PartyTaxScheme
43
            ]);
44
        }
45
        if ($this->PartyLegalEntity) {
46
            $writer->write([
47
                SchemaNS::CAC . 'PartyLegalEntity' => $this->PartyLegalEntity
48
            ]);
49
        }
50
    }
51
52
    public function getPartyIdentification() {
53
        return $this->PartyIdentification;
54
    }
55
56
    public function setPartyIdentification(PartyIdentification $PartyIdentification) {
57
        $this->PartyIdentification = $PartyIdentification;
58
        return $this;
59
    }
60
61
    public function getPartyName() {
62
        return $this->PartyName;
63
    }
64
65
    public function setPartyName(PartyName $PartyName) {
66
        $this->PartyName = $PartyName;
67
        return $this;
68
    }
69
70
    public function getPartyTaxScheme() {
71
        return $this->PartyTaxScheme;
72
    }
73
74
    public function setPartyTaxScheme($PartyTaxScheme) {
75
        $this->PartyTaxScheme = $PartyTaxScheme;
76
        return $this;
77
    }
78
79
    public function getPartyLegalEntity() {
80
        return $this->PartyLegalEntity;
81
    }
82
83
    public function setPartyLegalEntity($PartyLegalEntity) {
84
        $this->PartyLegalEntity = $PartyLegalEntity;
85
        return $this;
86
    }
87
88
}
89