Completed
Push — master ( 384fb3...7ac5df )
by Carlos C
17s queued 15s
created

Notificado::getDomicilio()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CfdiUtils\Elements\CartaPorte10;
4
5
use CfdiUtils\Elements\Common\AbstractElement;
6
7
class Notificado extends AbstractElement
8
{
9 1
    public function getElementName(): string
10
    {
11 1
        return 'cartaporte:Notificado';
12
    }
13
14
    public function getDomicilio(): Domicilio
15
    {
16
        /** @noinspection PhpIncompatibleReturnTypeInspection */
17
        return $this->helperGetOrAdd(new Domicilio());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->helperGetO...rtaPorte10\Domicilio()) could return the type CfdiUtils\Elements\CartaPorte10\Notificado which is incompatible with the type-hinted return CfdiUtils\Elements\CartaPorte10\Domicilio. Consider adding an additional type-check to rule them out.
Loading history...
18
    }
19
20
    public function addDomicilio(array $attributes = []): Domicilio
21
    {
22
        $domicilio = $this->getDomicilio();
23
        $domicilio->addAttributes($attributes);
24
25
        return $domicilio;
26
    }
27
}
28