GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Comprobante::attributes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the cfdi-xml project.
5
 *
6
 * (c) Kinedu
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Kinedu\CfdiXML\Node;
13
14
use Kinedu\CfdiXML\Common\Node;
15
16
class Comprobante extends Node
17
{
18
    /** @var string */
19
    protected $version;
20
21
    /** @var string */
22
    protected $nodeName = 'cfdi:Comprobante';
23
24
    /**
25
     * Create a new comprobante instance.
26
     *
27
     * @param array $data
28
     * @param string $version
29
     */
30
    public function __construct(array $data, string $version)
31
    {
32
        $this->version = $version;
33
34
        $data = array_merge($this->attributes(), $data);
35
36
        parent::__construct($data);
37
    }
38
39
    public function attributes(): array
40
    {
41
        return [
42
            'xmlns:cfdi' => 'http://www.sat.gob.mx/cfd/3',
43
            'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
44
            'xsi:schemaLocation' => 'http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd',
45
            'Version' => $this->version,
46
        ];
47
    }
48
}
49