M205   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
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 42
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 M205 extends Element implements ElementInterface
10
{
11
    const REG = 'M205';
12
    const LEVEL = 3;
13
    const PARENT = 'M200';
14
15
    protected $parameters = [
16
        'NUM_CAMPO' => [
17
            'type' => 'string',
18
            'regex' => '^.{2}$',
19
            'required' => false,
20
            'info' => 'Informar o número do campo do registro “M200” ',
21
            'format' => ''
22
        ],
23
        'COD_REC' => [
24
            'type' => 'string',
25
            'regex' => '^.{6}$',
26
            'required' => false,
27
            'info' => 'Informar o código da receita referente à contribuição a recolher, detalhada neste ' .
28
                'registro. ',
29
            'format' => ''
30
        ],
31
        'VL_DEBITO' => [
32
            'type' => 'numeric',
33
            'regex' => '^\d+(\.\d*)?|\.\d+$',
34
            'required' => false,
35
            'info' => 'Valor do Débito correspondente ao código do Campo 03, conforme informação na DCTF. ',
36
            'format' => '15v2'
37
        ],
38
39
    ];
40
41
    /**
42
     * Constructor
43
     * @param \stdClass $std
44
     */
45
    public function __construct(\stdClass $std)
46
    {
47
        parent::__construct(self::REG);
48
        $this->std = $this->standarize($std);
49
    }
50
}
51