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

Estados::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
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