C890::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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 C890 extends Element implements ElementInterface
10
{
11
    const REG = 'C890';
12
    const LEVEL = 4;
13
    const PARENT = 'C800';
14
15
    protected $parameters = [
16
        'NUM_PROC' => [
17
            'type' => 'string',
18
            'regex' => '^.{0,20}$',
19
            'required' => false,
20
            'info' => 'Identificação do processo ou ato concessório',
21
            'format' => ''
22
        ],
23
        'IND_PROC' => [
24
            'type' => 'string',
25
            'regex' => '^(1|3|9)$',
26
            'required' => false,
27
            'info' => 'Indicador da origem do processo:
28
             1 - Justiça Federal; 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