PartyLegalEntity   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 6

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRegistrationName() 0 2 1
A setRegistrationName() 0 3 1
A setRegistrationAddress() 0 3 1
A getRegistrationAddress() 0 2 1
A xmlSerialize() 0 7 2
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