Code Duplication    Length = 90-94 lines in 5 locations

src/Elements/Contribuicoes/D200.php 1 location

@@ 8-98 (lines=91) @@
5
use NFePHP\EFD\Common\Element;
6
use NFePHP\EFD\Common\ElementInterface;
7
8
class D200 extends Element implements ElementInterface
9
{
10
    const REG = 'D200';
11
    const LEVEL = 3;
12
    const PARENT = 'D001';
13
14
    protected $parameters = [
15
        'COD_MOD' => [
16
            'type' => 'string',
17
            'regex' => '^(07|08|8B|09|10|11|26|27|57|63|67)$',
18
            'required' => false,
19
            'info' => 'Código do modelo do documento fiscal, conforme a Tabela 4.1.1 ',
20
            'format' => ''
21
        ],
22
        'COD_SIT' => [
23
            'type' => 'numeric',
24
            'regex' => '^(00|01|06|07|08)$',
25
            'required' => false,
26
            'info' => 'Código da situação do documento fiscal, conforme a Tabela 4.1.2 ',
27
            'format' => ''
28
        ],
29
        'SER' => [
30
            'type' => 'string',
31
            'regex' => '^.{0,4}$',
32
            'required' => false,
33
            'info' => 'Série do documento fiscal ',
34
            'format' => ''
35
        ],
36
        'SUB' => [
37
            'type' => 'string',
38
            'regex' => '^.{0,3}$',
39
            'required' => false,
40
            'info' => 'Subsérie do documento fiscal ',
41
            'format' => ''
42
        ],
43
        'NUM_DOC_INI' => [
44
            'type' => 'numeric',
45
            'regex' => '^(\d{0,9})$',
46
            'required' => false,
47
            'info' => 'Número do documento fiscal inicial emitido no período (mesmo modelo, série e ' .
48
                'subsérie). ',
49
            'format' => ''
50
        ],
51
        'NUM_DOC_FIN' => [
52
            'type' => 'numeric',
53
            'regex' => '^(\d{0,9})$',
54
            'required' => false,
55
            'info' => 'Número do documento fiscal final emitido no período (mesmo modelo, série e subsérie). ',
56
            'format' => ''
57
        ],
58
        'CFOP' => [
59
            'type' => 'numeric',
60
            'regex' => '^(\d{4})$',
61
            'required' => false,
62
            'info' => 'Código Fiscal de Operação e Prestação conforme tabela indicada no item 4.2.2 ',
63
            'format' => ''
64
        ],
65
        'DT_REF' => [
66
            'type' => 'string',
67
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
68
            'required' => false,
69
            'info' => 'Data do dia de referência do resumo diário ',
70
            'format' => ''
71
        ],
72
        'VL_DOC' => [
73
            'type' => 'numeric',
74
            'regex' => '^\d+(\.\d*)?|\.\d+$',
75
            'required' => false,
76
            'info' => 'Valor total dos documentos fiscais ',
77
            'format' => '15v2'
78
        ],
79
        'VL_DESC' => [
80
            'type' => 'numeric',
81
            'regex' => '^\d+(\.\d*)?|\.\d+$',
82
            'required' => false,
83
            'info' => 'Valor total dos descontos ',
84
            'format' => '15v2'
85
        ],
86
87
    ];
88
89
    /**
90
     * Constructor
91
     * @param \stdClass $std
92
     */
93
    public function __construct(\stdClass $std)
94
    {
95
        parent::__construct(self::REG);
96
        $this->std = $this->standarize($std);
97
    }
98
}
99

src/Elements/ICMSIPI/D150.php 1 location

@@ 9-100 (lines=92) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D150 extends Element implements ElementInterface
10
{
11
    const REG = 'D150';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'COD_MUN_ORIG' => [
17
            'type'     => 'numeric',
18
            'regex' => '^[0-9]{7}$',
19
            'required' => true,
20
            'info'     => 'Código do município de origem do serviço, conforme a tabela IBGE',
21
            'format'   => ''
22
        ],
23
        'COD_MUN_DEST' => [
24
            'type'     => 'numeric',
25
            'regex' => '^[0-9]{7}$',
26
            'required' => true,
27
            'info'     => 'Código do município de destino, conforme a tabela IBGE',
28
            'format'   => ''
29
        ],
30
        'VEIC_ID' => [
31
            'type'     => 'string',
32
            'regex'    => '^[0-9]{0}$',
33
            'required' => true,
34
            'info'     => 'Identificação da aeronave (DAC)',
35
            'format'   => ''
36
        ],
37
        'VIAGEM' => [
38
            'type'     => 'string',
39
            'regex'    => '',
40
            'required' => true,
41
            'info'     => 'Número do vôo',
42
            'format'   => ''
43
        ],
44
        'IND_TFA' => [
45
            'type'     => 'numeric',
46
            'regex'    => '',
47
            'required' => true,
48
            'info'     => 'Indicador do tipo de tarifa aplicada: 0- Exp.'
49
            . '1- Enc.'
50
            . '2- C.I.'
51
            . '9- Outra',
52
            'format'   => ''
53
        ],
54
        'VL_PESO_TX' => [
55
            'type'     => 'numeric',
56
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
57
            'required' => true,
58
            'info'     => 'Peso taxado',
59
            'format'   => '15v2'
60
        ],
61
        'VL_TX_TERR' => [
62
            'type'     => 'numeric',
63
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
64
            'required' => true,
65
            'info'     => 'Valor da taxa terrestre',
66
            'format'   => '15v2'
67
        ],
68
        'VL_TX_RED' => [
69
            'type'     => 'numeric',
70
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
71
            'required' => true,
72
            'info'     => 'Valor da taxa de redespacho',
73
            'format'   => '15v2'
74
        ],
75
        'VL_OUT' => [
76
            'type'     => 'numeric',
77
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
78
            'required' => true,
79
            'info'     => 'Outros valores',
80
            'format'   => '15v2'
81
        ],
82
        'VL_TX_ADV' => [
83
            'type'     => 'numeric',
84
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
85
            'required' => true,
86
            'info'     => 'Valor da taxa ad valorem',
87
            'format'   => '15v2'
88
        ]
89
    ];
90
91
    /**
92
     * Constructor
93
     * @param \stdClass $std
94
     */
95
    public function __construct(\stdClass $std)
96
    {
97
        parent::__construct(self::REG);
98
        $this->std = $this->standarize($std);
99
    }
100
}
101

src/Elements/ICMSIPI/D390.php 1 location

@@ 9-98 (lines=90) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D390 extends Element implements ElementInterface
10
{
11
    const REG = 'D390';
12
    const LEVEL = 4;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'CST_ICMS' => [
17
            'type'     => 'numeric',
18
            'regex' => '^(\d{3})$',
19
            'required' => true,
20
            'info'     => 'Código da Situação Tributária, conforme a tabela indicada no item 4.3.1',
21
            'format'   => ''
22
        ],
23
        'CFOP' => [
24
            'type'     => 'numeric',
25
            'regex' => '^(\d{4})$',
26
            'required' => true,
27
            'info'     => 'Código Fiscal de Operação e Prestação',
28
            'format'   => ''
29
        ],
30
        'ALIQ_ICMS' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^[0-9]{6}$',
33
            'required' => true,
34
            'info'     => 'Alíquota do ICMS',
35
            'format'   => ''
36
        ],
37
        'VL_OPR' => [
38
            'type'     => 'numeric',
39
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => true,
41
            'info'     => 'Valor da operação correspondente à combinação de CST_ICMS, CFOP e alíquota do ICMS,'
42
            .' incluídas as despesas acessórias e acréscimos',
43
            'format'   => '15v2'
44
        ],
45
        'VL_BC_ISSQN' => [
46
            'type'     => 'numeric',
47
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
48
            'required' => true,
49
            'info'     => 'Valor da base de cálculo do ISSQN',
50
            'format'   => '15v2'
51
        ],
52
        'ALIQ_ISSQN' => [
53
            'type'     => 'numeric',
54
            'regex'    => '^[0-9]{6}$',
55
            'required' => true,
56
            'info'     => 'Alíquota do ISSQN',
57
            'format'   => ''
58
        ],
59
        'VL_ISSQN' => [
60
            'type'     => 'numeric',
61
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
62
            'required' => true,
63
            'info'     => 'Valor do ISSQN',
64
            'format'   => '15v2'
65
        ],
66
        'VL_BC_ICMS' => [
67
            'type'     => 'numeric',
68
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
69
            'required' => true,
70
            'info'     => 'Base de cálculo do ICMS acumulada relativa à alíquota informada',
71
            'format'   => '15v2'
72
        ],
73
        'VL_ICMS' => [
74
            'type'     => 'numeric',
75
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
76
            'required' => true,
77
            'info'     => 'Valor do ICMS acumulado relativo à alíquota informada',
78
            'format'   => '15v2'
79
        ],
80
        'COD_OBS' => [
81
            'type'     => 'string',
82
            'regex'    => '^[0-9]{6}$',
83
            'required' => true,
84
            'info'     => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)',
85
            'format'   => ''
86
        ]
87
    ];
88
89
    /**
90
     * Constructor
91
     * @param \stdClass $std
92
     */
93
    public function __construct(\stdClass $std)
94
    {
95
        parent::__construct(self::REG);
96
        $this->std = $this->standarize($std);
97
    }
98
}
99

src/Elements/ICMSIPI/D690.php 1 location

@@ 9-102 (lines=94) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D690 extends Element implements ElementInterface
10
{
11
    const REG = 'D690';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'CST_ICMS' => [
17
            'type'     => 'numeric',
18
            'regex' => '^(\d{3})$',
19
            'required' => true,
20
            'info'     => 'Código da Situação Tributária, conforme a tabela indicada no item 4.3.1',
21
            'format'   => ''
22
        ],
23
        'CFOP' => [
24
            'type'     => 'numeric',
25
            'regex' => '^(\d{4})$',
26
            'required' => true,
27
            'info'     => 'Código Fiscal de Operação e Prestação, conforme a tabela indicada no item 4.2.2',
28
            'format'   => ''
29
        ],
30
        'ALIQ_ICMS' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^[0-9]{6}$',
33
            'required' => true,
34
            'info'     => 'Alíquota do ICMS',
35
            'format'   => ''
36
        ],
37
        'VL_OPR' => [
38
            'type'     => 'numeric',
39
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => true,
41
            'info'     => 'Valor da operação correspondente à combinação de CST_ICMS, CFOP e alíquota do ICMS,'
42
            .' incluídas as despesas acessórias e acréscimos',
43
            'format'   => '15v2'
44
        ],
45
        'VL_BC_ICMS' => [
46
            'type'     => 'numeric',
47
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
48
            'required' => true,
49
            'info'     => 'Parcela correspondente ao Valor da base de cálculo do ICMS referente à combinação '
50
            .'CST_ICMS, CFOP e alíquota do ICMS',
51
            'format'   => '15v2'
52
        ],
53
        'VL_ICMS' => [
54
            'type'     => 'numeric',
55
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
56
            'required' => true,
57
            'info'     => 'Parcela correspondente ao Valor do ICMS referente à combinação CST_ICMS, '
58
            .'CFOP e alíquota do ICMS',
59
            'format'   => '15v2'
60
        ],
61
        'VL_BC_ICMS_UF' => [
62
            'type'     => 'numeric',
63
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
64
            'required' => true,
65
            'info'     => 'Parcela correspondente ao valor da base de cálculo do ICMS de outras UFs, referente'
66
            .' à combinação de CST_ICMS, CFOP e alíquota do ICMS',
67
            'format'   => '15v2'
68
        ],
69
        'VL_ICMS_UF' => [
70
            'type'     => 'numeric',
71
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
72
            'required' => true,
73
            'info'     => 'Parcela correspondente ao valor do ICMS de outras UFs, referente à combinação',
74
            'format'   => '15v2'
75
        ],
76
        'VL_RED_BC' => [
77
            'type'     => 'numeric',
78
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
79
            'required' => true,
80
            'info'     => 'Valor não tributado em função da redução da base de cálculo do ICMS, referente à combinação'
81
            .' de CST_ICMS, CFOP e alíquota do ICMS',
82
            'format'   => '15v2'
83
        ],
84
        'COD_OBS' => [
85
            'type'     => 'string',
86
            'regex'    => '^[0-9]{6}$',
87
            'required' => true,
88
            'info'     => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)',
89
            'format'   => ''
90
        ]
91
    ];
92
93
    /**
94
     * Constructor
95
     * @param \stdClass $std
96
     */
97
    public function __construct(\stdClass $std)
98
    {
99
        parent::__construct(self::REG);
100
        $this->std = $this->standarize($std);
101
    }
102
}
103

src/Elements/ICMSIPI/H010.php 1 location

@@ 20-112 (lines=93) @@
17
 * informar neste registro, além dos itens exigidos pelas legislações do ICMS e
18
 * do IPI, aqueles bens exigidos pela legislação do Imposto de Renda.
19
 */
20
class H010 extends Element implements ElementInterface
21
{
22
    const REG = 'H010';
23
    const LEVEL = 3;
24
    const PARENT = 'H005';
25
    
26
    protected $parameters = [
27
        'COD_ITEM' => [
28
            'type'     => 'string',
29
            'regex'    => '^.{1,60}',
30
            'required' => true,
31
            'info'     => 'Código do item (campo 02 do Registro 0200)',
32
            'format'   => ''
33
        ],
34
        'UNID' => [
35
            'type'     => 'string',
36
            'regex'    => '^.{1,6}',
37
            'required' => true,
38
            'info'     => 'Unidade do item',
39
            'format'   => ''
40
        ],
41
        'QTD' => [
42
            'type'     => 'numeric',
43
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
44
            'required' => true,
45
            'info'     => 'Quantidade do item',
46
            'format'   => '15v3'
47
        ],
48
        'VL_UNIT' => [
49
            'type'     => 'numeric',
50
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
51
            'required' => true,
52
            'info'     => 'Valor unitário do item',
53
            'format'   => '15v6'
54
        ],
55
        'VL_ITEM' => [
56
            'type'     => 'numeric',
57
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
58
            'required' => true,
59
            'info'     => 'Valor do item',
60
            'format'   => '15v2'
61
        ],
62
        'IND_PROP' => [
63
            'type'     => 'integer',
64
            'regex'    => '^[0-2]{1}$',
65
            'required' => true,
66
            'info'     => 'Indicador de propriedade/posse do item: '
67
            . '0-Item de propriedade do informante e em seu poder; '
68
            . '1-Item de propriedade do informante em posse de terceiros; '
69
            . '2- Item de propriedade de terceiros em posse do informante',
70
            'format'   => ''
71
        ],
72
        'COD_PART' => [
73
            'type'     => 'string',
74
            'regex'    => '^.{1,60}$',
75
            'required' => false,
76
            'info'     => 'Código do participante (campo 02 do Registro 0150): '
77
            . '- proprietário/possuidor que não seja o informante do arquivo',
78
            'format'   => ''
79
        ],
80
        'TXT_COMPL' => [
81
            'type'     => 'string',
82
            'regex'    => '^.{3,255}',
83
            'required' => false,
84
            'info'     => 'Descrição complementar.',
85
            'format'   => ''
86
        ],
87
        'COD_CTA' => [
88
            'type'     => 'string',
89
            'regex'    => '^.{1,255}',
90
            'required' => false,
91
            'info'     => 'Código da conta analítica contábil debitada/creditada',
92
            'format'   => ''
93
        ],
94
        'VL_ITEM_IR' => [
95
            'type'     => 'numeric',
96
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
97
            'required' => false,
98
            'info'     => 'Valor do item para efeitos do Imposto de Renda.',
99
            'format'   => '15v2'
100
        ]
101
    ];
102
    
103
    /**
104
     * Constructor
105
     * @param \stdClass $std
106
     */
107
    public function __construct(\stdClass $std)
108
    {
109
        parent::__construct(self::REG);
110
        $this->std = $this->standarize($std);
111
    }
112
}
113