D509   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
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 36
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
8
class D509 extends Element implements ElementInterface
9
{
10
    const REG = 'D509';
11
    const LEVEL = 4;
12
    const PARENT = 'D500';
13
14
    protected $parameters = [
15
        'NUM_PROC' => [
16
            'type' => 'string',
17
            'regex' => '^.{0,20}$',
18
            'required' => false,
19
            'info' => 'Identificação do processo ou ato concessório ',
20
            'format' => ''
21
        ],
22
        'IND_PROC' => [
23
            'type' => 'string',
24
            'regex' => '^(1|3|9)$',
25
            'required' => false,
26
            'info' => 'Indicador da origem do processo ' .
27
                ' 1 - Justiça Federal ' .
28
                ' 3 – Secretaria da Receita Federal do Brasil 9 – Outros. ',
29
            'format' => ''
30
        ],
31
32
    ];
33
34
    /**
35
     * Constructor
36
     * @param \stdClass $std
37
     */
38
    public function __construct(\stdClass $std)
39
    {
40
        parent::__construct(self::REG);
41
        $this->std = $this->standarize($std);
42
    }
43
}
44