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

IntegrationComponent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
dl 0
loc 23
c 1
b 0
f 0
ccs 4
cts 8
cp 0.5
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getWorkers() 0 4 1
A __construct() 0 3 1
A getSiiLazyWorker() 0 3 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\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