PartyLegalEntity::setRegistrationAddress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
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
use Sabre\Xml\Element\Cdata;
15
16
class PartyLegalEntity extends BaseComponent {
17
18
    protected $RegistrationName;
19
20
    /** @var RegistrationAddress */
21
    protected $RegistrationAddress;
22
    
23
    function xmlSerialize(Writer $writer) {
24
        $writer->write([
25
            SchemaNS::CBC . 'RegistrationName' => new Cdata($this->RegistrationName)
26
        ]);
27
        if ($this->RegistrationAddress) {
28
            $writer->write([
29
                SchemaNS::CAC . 'RegistrationAddress' => $this->RegistrationAddress
30
            ]);
31
        }
32
    }
33
34
    public function getRegistrationName() {
35
        return $this->RegistrationName;
36
    }
37
38
    public function setRegistrationName($RegistrationName) {
39
        $this->RegistrationName = $RegistrationName;
40
        return $this;
41
    }
42
43
    public function getRegistrationAddress() {
44
        return $this->RegistrationAddress;
45
    }
46
47
    public function setRegistrationAddress(RegistrationAddress $RegistrationAddress) {
48
        $this->RegistrationAddress = $RegistrationAddress;
49
        return $this;
50
    }
51
52
}
53