C105::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace NFePHP\EFD\Elements\ICMSIPI;
4
5
use NFePHP\EFD\Common\Element;
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
/**
10
 * REGISTRO C105: OPERAÇÕES COM ICMS ST RECOLHIDO PARA UF DIVERSA DO
11
 * DESTINATÁRIO DO DOCUMENTO FISCAL (CÓDIGO 55).
12
 * @package NFePHP\EFD\Elements\ICMSIPI
13
 */
14
class C105 extends Element implements ElementInterface
15
{
16
    const REG = 'C105';
17
    const LEVEL = 3;
18
    const PARENT = 'C100';
19
20
    protected $parameters = [
21
        'OPER' => [
22
            'type' => 'string',
23
            'regex' => '^[0-1]{1}$',
24
            'required' => true,
25
            'info' => 'Indicador do tipo de operação',
26
            'format' => ''
27
        ],
28
        'UF' => [
29
            'type' => 'string',
30
            'regex' => '^[a-zA-Z]{2}$',
31
            'required' => true,
32
            'info' => 'Sigla da UF de destino do ICMS_ST',
33
            'format' => ''
34
        ]
35
    ];
36
37
    /**
38
     * Constructor
39
     * @param \stdClass $std
40
     */
41
    public function __construct(\stdClass $std)
42
    {
43
        parent::__construct(self::REG);
44
        $this->std = $this->standarize($std);
45
    }
46
}
47