Completed
Pull Request — master (#464)
by
unknown
14:04
created

C595::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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 C595:INFORMAÇÕES DO FUNDO DE COMBATE À POBREZA – FCP NA NF3e (CÓDIGO 66)
11
 * @package NFePHP\EFD\Elements\ICMSIPI
12
 */
13
class C595 extends Element implements ElementInterface
14
{
15
    const REG = 'C595';
16
    const LEVEL = 3;
17
    const PARENT = 'C500';
18
    
19
    protected $parameters = [
20
        'COD_OBS' => [
21
            'type'     => 'string',
22
            'regex'    => '^[0-9]{6}$',
23
            'required' => true,
24
            'info'     => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)',
25
            'format'   => ''
26
        ],
27
        'TXT_COMPL' => [
28
            'type'     => 'string',
29
            'regex'    => '^[0-9]{0}$',
30
            'required' => true,
31
            'info'     => 'Descrição complementar do código de observação.',
32
            'format'   => ''
33
        ]
34
    ];
35
    
36
    /**
37
     * Constructor
38
     * @param \stdClass $std
39
     */
40
    public function __construct(\stdClass $std)
41
    {
42
        parent::__construct(self::REG);
43
        $this->std = $this->standarize($std);
44
    }
45
}
46