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

C591   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 33
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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 C591:INFORMAÇÕES DO FUNDO DE COMBATE À POBREZA – FCP NA NF3e (CÓDIGO 66)
11
 * @package NFePHP\EFD\Elements\ICMSIPI
12
 */
13
class C591 extends Element implements ElementInterface
14
{
15
    const REG = 'C591';
16
    const LEVEL = 4;
17
    const PARENT = 'C590';
18
    
19
    protected $parameters = [
20
        'VL_FCP_OP' => [
21
            'type'     => 'numeric',
22
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
23
            'required' => true,
24
            'info'     => 'Valor do Fundo de Combate à Pobreza (FCP) vinculado à operação própria, na combinação de CST_ICMS, CFOP e alíquota do ICMS',
25
            'format'   => '15v2'
26
        ],
27
        'VL_FCP_ST' => [
28
            'type'     => 'numeric',
29
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
30
            'required' => true,
31
            'info'     => 'Valor do Fundo de Combate à Pobreza (FCP) vinculado à operação de substituição tributária, na combinação de CST_ICMS, CFOP e alíquota do ICMS.',
32
            'format'   => '15v2'
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