Completed
Push — master ( da5501...7bde0b )
by Carlos C
21s queued 15s
created

ServiciosPlataformasTecnologicas   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 13
c 2
b 0
f 0
dl 0
loc 29
ccs 10
cts 10
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getElementName() 0 3 1
A getFixedAttributes() 0 9 1
A getServicios() 0 3 1
A addServicios() 0 5 1
1
<?php
2
3
namespace CfdiUtils\Elements\PlataformasTecnologicas10;
4
5
use CfdiUtils\Elements\Common\AbstractElement;
6
7
class ServiciosPlataformasTecnologicas extends AbstractElement
8
{
9 1
    public function getElementName(): string
10
    {
11 1
        return 'plataformasTecnologicas:ServiciosPlataformasTecnologicas';
12
    }
13
14 1
    public function getFixedAttributes(): array
15
    {
16
        return [
17 1
            'xmlns:plataformasTecnologicas' => 'http://www.sat.gob.mx/esquemas/retencionpago/1'
18
                . '/PlataformasTecnologicas10',
19
            'xsi:schemaLocation' => 'http://www.sat.gob.mx/esquemas/retencionpago/1/PlataformasTecnologicas10'
20
                . ' http://www.sat.gob.mx/esquemas/retencionpago/1/PlataformasTecnologicas10'
21
                . '/ServiciosPlataformasTecnologicas10.xsd',
22
            'Version' => '1.0',
23
        ];
24
    }
25
26 1
    public function getServicios(): Servicios
27
    {
28 1
        return $this->helperGetOrAdd(new Servicios());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->helperGetO...ologicas10\Servicios()) could return the type CfdiUtils\Elements\Plata...PlataformasTecnologicas which is incompatible with the type-hinted return CfdiUtils\Elements\Plata...ecnologicas10\Servicios. Consider adding an additional type-check to rule them out.
Loading history...
29
    }
30
31 1
    public function addServicios(array $attributes = []): Servicios
32
    {
33 1
        $subject = $this->getServicios();
34 1
        $subject->addAttributes($attributes);
35 1
        return $subject;
36
    }
37
}
38