Z1502   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 41
ccs 0
cts 5
cp 0
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\Contribuicoes;
4
5
use NFePHP\EFD\Common\Element;
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z1502 extends Element implements ElementInterface
10
{
11
    const REG = '1502';
12
    const LEVEL = 4;
13
    const PARENT = '1500';
14
15
    protected $parameters = [
16
        'VL_CRED_COFINS_TRIB_MI' => [
17
            'type' => 'numeric',
18
            'regex' => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => false,
20
            'info' => 'Parcela do Crédito de COFINS, vinculada a Receita Tributada no Mercado Interno ',
21
            'format' => '15v2'
22
        ],
23
        'VL_CRED_COFINS_NT_MI' => [
24
            'type' => 'numeric',
25
            'regex' => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => false,
27
            'info' => 'Parcela do Crédito de COFINS, vinculada a Receita Não Tributada no Mercado Interno ',
28
            'format' => '15v2'
29
        ],
30
        'VL_CRED_COFINS_EXP' => [
31
            'type' => 'numeric',
32
            'regex' => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => false,
34
            'info' => 'Parcela do Crédito de COFINS, vinculada a Receita de Exportação ',
35
            'format' => '15v2'
36
        ],
37
38
    ];
39
40
    /**
41
     * Constructor
42
     * @param \stdClass $std
43
     */
44
    public function __construct(\stdClass $std)
45
    {
46
        parent::__construct(self::REG);
47
        $this->std = $this->standarize($std);
48
    }
49
}
50