Test Failed
Push — master ( 0741dd...48ec12 )
by Esteban De La Fuente
08:16 queued 02:11
created

Emisor   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Test Coverage

Coverage 20%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLogo() 0 3 1
A getAutorizacionDte() 0 3 1
A setLogo() 0 5 1
A setAutorizacionDte() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * LibreDTE: Biblioteca PHP (Núcleo).
7
 * Copyright (C) LibreDTE <https://www.libredte.cl>
8
 *
9
 * Este programa es software libre: usted puede redistribuirlo y/o modificarlo
10
 * bajo los términos de la Licencia Pública General Affero de GNU publicada por
11
 * la Fundación para el Software Libre, ya sea la versión 3 de la Licencia, o
12
 * (a su elección) cualquier versión posterior de la misma.
13
 *
14
 * Este programa se distribuye con la esperanza de que sea útil, pero SIN
15
 * GARANTÍA ALGUNA; ni siquiera la garantía implícita MERCANTIL o de APTITUD
16
 * PARA UN PROPÓSITO DETERMINADO. Consulte los detalles de la Licencia Pública
17
 * General Affero de GNU para obtener una información más detallada.
18
 *
19
 * Debería haber recibido una copia de la Licencia Pública General Affero de
20
 * GNU junto a este programa.
21
 *
22
 * En caso contrario, consulte <http://www.gnu.org/licenses/agpl.html>.
23
 */
24
25
namespace libredte\lib\Core\Package\Billing\Component\TradingParties\Entity;
26
27
use libredte\lib\Core\Package\Billing\Component\TradingParties\Contract\AutorizacionDteInterface;
28
use libredte\lib\Core\Package\Billing\Component\TradingParties\Contract\EmisorInterface;
29
use libredte\lib\Core\Package\Billing\Component\TradingParties\Trait\CorreoIntercambioDteInfoTrait;
30
31
/**
32
 * Clase para representar un emisor de un documento tributario.
33
 */
34
class Emisor extends Contribuyente implements EmisorInterface
35
{
36
    // Traits que usa esta entidad.
37
    use CorreoIntercambioDteInfoTrait;
38
39
    /**
40
     * Información de la autorización que da el SII para ser emisor de
41
     * documentos tributarios electrónicos.
42
     *
43
     * La autorización contiene además el ambiente en que se autoriza al emisor.
44
     *
45
     * @var AutorizacionDteInterface|null
46
     */
47
    private ?AutorizacionDteInterface $autorizacionDte = null;
48
49
    /**
50
     * Logo del emisor.
51
     *
52
     * @var string|null
53
     */
54
    private ?string $logo = null;
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function setAutorizacionDte(AutorizacionDteInterface $autorizacionDte): static
60
    {
61
        $this->autorizacionDte = $autorizacionDte;
62
63
        return $this;
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69 54
    public function getAutorizacionDte(): ?AutorizacionDteInterface
70
    {
71 54
        return $this->autorizacionDte;
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     */
77
    public function setLogo(string $logo): static
78
    {
79
        $this->logo = $logo;
80
81
        return $this;
82
    }
83
84
    /**
85
     * {@inheritdoc}
86
     */
87
    public function getLogo(): ?string
88
    {
89
        return $this->logo;
90
    }
91
}
92