BillingPackage::getOwnershipTransferComponent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
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;
26
27
use Derafu\Backbone\Abstract\AbstractPackage;
28
use Derafu\Backbone\Attribute\Package;
29
use libredte\lib\Core\Package\Billing\Component\Book\Contract\BookComponentInterface;
30
use libredte\lib\Core\Package\Billing\Component\Document\Contract\DocumentComponentInterface;
31
use libredte\lib\Core\Package\Billing\Component\Exchange\Contract\ExchangeComponentInterface;
32
use libredte\lib\Core\Package\Billing\Component\Identifier\Contract\IdentifierComponentInterface;
33
use libredte\lib\Core\Package\Billing\Component\Integration\Contract\IntegrationComponentInterface;
34
use libredte\lib\Core\Package\Billing\Component\OwnershipTransfer\Contract\OwnershipTransferComponentInterface;
35
use libredte\lib\Core\Package\Billing\Component\TradingParties\Contract\TradingPartiesComponentInterface;
36
use libredte\lib\Core\Package\Billing\Contract\BillingPackageInterface;
37
38
/**
39
 * Paquete de facturación: "billing".
40
 */
41
#[Package(name: 'billing')]
42
class BillingPackage extends AbstractPackage implements BillingPackageInterface
43
{
44 57
    public function __construct(
45
        private BookComponentInterface $bookComponent,
46
        private DocumentComponentInterface $documentComponent,
47
        private ExchangeComponentInterface $exchangeComponent,
48
        private IdentifierComponentInterface $identifierComponent,
49
        private IntegrationComponentInterface $integrationComponent,
50
        private OwnershipTransferComponentInterface $ownershipTransferComponent,
51
        private TradingPartiesComponentInterface $tradingPartiesComponent
52
    ) {
53 57
    }
54
55
    /**
56
     * {@inheritDoc}
57
     */
58
    public function getComponents(): array
59
    {
60
        return [
61
            'book' => $this->bookComponent,
62
            'document' => $this->documentComponent,
63
            'exchange' => $this->exchangeComponent,
64
            'identifier' => $this->identifierComponent,
65
            'integration' => $this->integrationComponent,
66
            'ownership_transfer' => $this->ownershipTransferComponent,
67
            'trading_parties' => $this->tradingPartiesComponent,
68
        ];
69
    }
70
71
    /**
72
     * {@inheritDoc}
73
     */
74
    public function getBookComponent(): BookComponentInterface
75
    {
76
        return $this->bookComponent;
77
    }
78
79
    /**
80
     * {@inheritDoc}
81
     */
82 57
    public function getDocumentComponent(): DocumentComponentInterface
83
    {
84 57
        return $this->documentComponent;
85
    }
86
87
    /**
88
     * {@inheritDoc}
89
     */
90
    public function getExchangeComponent(): ExchangeComponentInterface
91
    {
92
        return $this->exchangeComponent;
93
    }
94
95
    /**
96
     * {@inheritDoc}
97
     */
98 53
    public function getIdentifierComponent(): IdentifierComponentInterface
99
    {
100 53
        return $this->identifierComponent;
101
    }
102
103
    /**
104
     * {@inheritDoc}
105
     */
106
    public function getIntegrationComponent(): IntegrationComponentInterface
107
    {
108
        return $this->integrationComponent;
109
    }
110
111
    /**
112
     * {@inheritDoc}
113
     */
114
    public function getOwnershipTransferComponent(): OwnershipTransferComponentInterface
115
    {
116
        return $this->ownershipTransferComponent;
117
    }
118
119
    /**
120
     * {@inheritDoc}
121
     */
122
    public function getTradingPartiesComponent(): TradingPartiesComponentInterface
123
    {
124
        return $this->tradingPartiesComponent;
125
    }
126
}
127