Passed
Push — master ( 9d79d3...4bb85e )
by Esteban De La Fuente
08:41
created

IntegrationComponent::getWorkers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 4
c 1
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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\Integration;
26
27
use Derafu\Lib\Core\Foundation\Abstract\AbstractComponent;
28
use libredte\lib\Core\Package\Billing\Component\Integration\Contract\IntegrationComponentInterface;
29
use libredte\lib\Core\Package\Billing\Component\Integration\Contract\SiiLazyWorkerInterface;
30
31
/**
32
 * Componente "billing.integration".
33
 */
34
class IntegrationComponent extends AbstractComponent implements IntegrationComponentInterface
35
{
36 1
    public function __construct(
37
        private SiiLazyWorkerInterface $siiLazyWorker
38
    ) {
39 1
    }
40
41
    /**
42
     * {@inheritDoc}
43
     */
44
    public function getWorkers(): array
45
    {
46
        return [
47
            'sii_lazy' => $this->siiLazyWorker,
48
        ];
49
    }
50
51
    /**
52
     * {@inheritDoc}
53
     */
54 1
    public function getSiiLazyWorker(): SiiLazyWorkerInterface
55
    {
56 1
        return $this->siiLazyWorker;
57
    }
58
}
59