Test Failed
Pull Request — master (#11)
by
unknown
02:33
created

Estados   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A catalogName() 0 3 1
A create() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\SatCatalogos\NOMINA;
6
7
use PhpCfdi\SatCatalogos\Common\AbstractCatalogIdentifiable;
8
use PhpCfdi\SatCatalogos\Common\EntryIdentifiable;
9
use PhpCfdi\SatCatalogos\Repository;
10
11
/**
12
 * Class Estados
13
 * @method Estado obtain($estado, $pais, $texto)
14
 */
15
class Estados extends AbstractCatalogIdentifiable
16
{
17
    protected function catalogName(): string
18
    {
19
        return Repository::NOMINA_ESTADOS;
20
    }
21
22
    /**
23
     * @param array<string, mixed> $data
24
     * @return Estado
25
     */
26
    public function create(array $data): EntryIdentifiable
27
    {
28
        return new Estado(
29
            $data['estado'],
30
            $data['pais'],
31
            $data['texto']
32
        );
33
    }
34
}
35