M230   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 63
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 63
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 M230 extends Element implements ElementInterface
10
{
11
    const REG = 'M230';
12
    const LEVEL = 4;
13
    const PARENT = 'M200';
14
15
    protected $parameters = [
16
        'CNPJ' => [
17
            'type' => 'string',
18
            'regex' => '^[0-9]{14}$',
19
            'required' => false,
20
            'info' => 'CNPJ da pessoa jurídica de direito público, empresa pública, sociedade de economia ' .
21
                'mista ou suas subsidiárias. ',
22
            'format' => ''
23
        ],
24
        'VL_VEND' => [
25
            'type' => 'numeric',
26
            'regex' => '^\d+(\.\d*)?|\.\d+$',
27
            'required' => false,
28
            'info' => 'Valor Total das vendas no período ',
29
            'format' => '15v2'
30
        ],
31
        'VL_NAO_RECEB' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Valor Total não recebido no período ',
36
            'format' => '15v2'
37
        ],
38
        'VL_CONT_DIF' => [
39
            'type' => 'numeric',
40
            'regex' => '^\d+(\.\d*)?|\.\d+$',
41
            'required' => false,
42
            'info' => 'Valor da Contribuição diferida no período ',
43
            'format' => '15v2'
44
        ],
45
        'VL_CRED_DIF' => [
46
            'type' => 'numeric',
47
            'regex' => '^\d+(\.\d*)?|\.\d+$',
48
            'required' => false,
49
            'info' => 'Valor do Crédito diferido no período ',
50
            'format' => '15v2'
51
        ],
52
        'COD_CRED' => [
53
            'type' => 'string',
54
            'regex' => '^.{3}$',
55
            'required' => false,
56
            'info' => 'Código de Tipo de Crédito diferido no período, conforme a Tabela 4.3.6. ',
57
            'format' => ''
58
        ],
59
60
    ];
61
62
    /**
63
     * Constructor
64
     * @param \stdClass $std
65
     */
66
    public function __construct(\stdClass $std)
67
    {
68
        parent::__construct(self::REG);
69
        $this->std = $this->standarize($std);
70
    }
71
}
72