This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
10
{
11
const REG = 'D162';
12
const LEVEL = 4;
13
const PARENT = '';
14
15
protected $parameters = [
16
'COD_MOD' => [
17
'type' => 'string',
18
'regex' => '^[0-9]{2}$',
19
'required' => true,
20
'info' => 'Código do modelo do documento fiscal, conforme a tabela 4.1.1',
21
'format' => ''
22
],
23
'SER' => [
24
'type' => 'string',
25
'regex' => '^[0-9]{4}$',
26
'required' => true,
27
'info' => 'Série do documento fiscal',
28
'format' => ''
29
],
30
'NUM_DOC' => [
31
'type' => 'numeric',
32
'regex' => '^[0-9]{9}$',
33
'required' => true,
34
'info' => 'Número do documento fiscal',
35
'format' => ''
36
],
37
'DT_DOC' => [
38
'type' => 'numeric',
39
'regex' => '',
40
'required' => true,
41
'info' => 'Data da emissão do documento fiscal',
42
'format' => ''
43
],
44
'VL_DOC' => [
45
'type' => 'numeric',
46
'regex' => '^\d+(\.\d*)?|\.\d+$',
47
'required' => true,
48
'info' => 'Valor total do documento fiscal',
49
'format' => '15v2'
50
],
51
'VL_MERC' => [
52
'type' => 'numeric',
53
'regex' => '^\d+(\.\d*)?|\.\d+$',
54
'required' => true,
55
'info' => 'Valor das mercadorias constantes no documento fiscal',
56
'format' => '15v2'
57
],
58
'QTD_VOL' => [
59
'type' => 'numeric',
60
'regex' => '',
61
'required' => true,
62
'info' => 'Quantidade de volumes transportados',
63
'format' => ''
64
],
65
'PESO_BRT' => [
66
'type' => 'numeric',
67
'regex' => '^\d+(\.\d*)?|\.\d+$',
68
'required' => true,
69
'info' => 'Peso bruto dos volumes transportados (em kg)',
70
'format' => '15v2'
71
],
72
'PESO_LIQ' => [
73
'type' => 'numeric',
74
'regex' => '^\d+(\.\d*)?|\.\d+$',
75
'required' => true,
76
'info' => 'Peso líquido dos volumes transportados (em kg)',
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.