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

addContribucionGubernamental()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
3
namespace CfdiUtils\Elements\PlataformasTecnologicas10;
4
5
use CfdiUtils\Elements\Common\AbstractElement;
6
7
class DetallesDelServicio extends AbstractElement
8
{
9 2
    public function getElementName(): string
10
    {
11 2
        return 'plataformasTecnologicas:DetallesDelServicio';
12
    }
13
14 2
    public function getChildrenOrder(): array
15
    {
16
        return [
17 2
            'plataformasTecnologicas:ImpuestosTrasladadosdelServicio',
18
            'plataformasTecnologicas:ContribucionGubernamental',
19
            'plataformasTecnologicas:ComisionDelServicio',
20
        ];
21
    }
22
23 1
    public function getImpuestosTrasladadosdelServicio(): ImpuestosTrasladadosdelServicio
24
    {
25 1
        return $this->helperGetOrAdd(new ImpuestosTrasladadosdelServicio());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->helperGetO...asladadosdelServicio()) could return the type CfdiUtils\Elements\Plata...s10\DetallesDelServicio which is incompatible with the type-hinted return CfdiUtils\Elements\Plata...sTrasladadosdelServicio. Consider adding an additional type-check to rule them out.
Loading history...
26
    }
27
28 1
    public function addImpuestosTrasladadosdelServicio(array $attributes = []): ImpuestosTrasladadosdelServicio
29
    {
30 1
        $subject = $this->getImpuestosTrasladadosdelServicio();
31 1
        $subject->addAttributes($attributes);
32 1
        return $subject;
33
    }
34
35 1
    public function getContribucionGubernamental(): ContribucionGubernamental
36
    {
37 1
        return $this->helperGetOrAdd(new ContribucionGubernamental());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->helperGetO...ibucionGubernamental()) could return the type CfdiUtils\Elements\Plata...s10\DetallesDelServicio which is incompatible with the type-hinted return CfdiUtils\Elements\Plata...ntribucionGubernamental. Consider adding an additional type-check to rule them out.
Loading history...
38
    }
39
40 1
    public function addContribucionGubernamental(array $attributes = []): ContribucionGubernamental
41
    {
42 1
        $subject = $this->getContribucionGubernamental();
43 1
        $subject->addAttributes($attributes);
44 1
        return $subject;
45
    }
46
47 1
    public function getComisionDelServicio(): ComisionDelServicio
48
    {
49 1
        return $this->helperGetOrAdd(new ComisionDelServicio());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->helperGetO...\ComisionDelServicio()) could return the type CfdiUtils\Elements\Plata...s10\DetallesDelServicio which is incompatible with the type-hinted return CfdiUtils\Elements\Plata...s10\ComisionDelServicio. Consider adding an additional type-check to rule them out.
Loading history...
50
    }
51
52 1
    public function addComisionDelServicio(array $attributes = []): ComisionDelServicio
53
    {
54 1
        $subject = $this->getComisionDelServicio();
55 1
        $subject->addAttributes($attributes);
56 1
        return $subject;
57
    }
58
}
59