DespatchDocumentReference   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDocumentTypeCode() 0 2 1
A setDocumentTypeCode() 0 3 1
A getID() 0 2 1
A setID() 0 3 1
A xmlSerialize() 0 10 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 DespatchDocumentReference extends BaseComponent {
16
17
    protected $ID;
18
    protected $DocumentTypeCode;
19
20
    function xmlSerialize(Writer $writer) {
21
        $writer->write([
22
            SchemaNS::CBC . 'ID' => $this->ID,
23
            [
24
                'name' => SchemaNS::CBC . 'DocumentTypeCode',
25
                'value' => $this->DocumentTypeCode,
26
                'attributes' => [
27
                    'listAgencyName' => 'PE:SUNAT',
28
                    'listName' => 'SUNAT:Identificador de guía relacionada',
29
                    'listURI' => 'urn:pe:gob:sunat:cpe:see:gem:catalogos:catalogo12'
30
                ]
31
            ]
32
        ]);
33
    }
34
35
    public function getID() {
36
        return $this->ID;
37
    }
38
39
    public function setID($ID) {
40
        $this->ID = $ID;
41
        return $this;
42
    }
43
44
    public function getDocumentTypeCode() {
45
        return $this->DocumentTypeCode;
46
    }
47
48
    public function setDocumentTypeCode($DocumentTypeCode) {
49
        $this->DocumentTypeCode = $DocumentTypeCode;
50
        return $this;
51
    }
52
53
}
54