Code Duplication    Length = 104-104 lines in 4 locations

src/Elements/Contribuicoes/C820.php 1 location

@@ 9-112 (lines=104) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class C820 extends Element implements ElementInterface
10
{
11
    const REG = 'C820';
12
    const LEVEL = 4;
13
    const PARENT = 'C800';
14
15
    protected $parameters = [
16
        'CFOP' => [
17
            'type' => 'numeric',
18
            'regex' => '^(\d{4})$',
19
            'required' => false,
20
            'info' => 'Código fiscal de operação e prestação',
21
            'format' => ''
22
        ],
23
        'VL_ITEM' => [
24
            'type' => 'numeric',
25
            'regex' => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => false,
27
            'info' => 'Valor total dos itens',
28
            'format' => '15v2'
29
        ],
30
        'COD_ITEM' => [
31
            'type' => 'string',
32
            'regex' => '^.{0,60}$',
33
            'required' => false,
34
            'info' => 'Código do item (campo 02 do Registro 0200)',
35
            'format' => ''
36
        ],
37
        'CST_PIS' => [
38
            'type' => 'numeric',
39
            'regex' => '^((0[1-9])|49|99)$',
40
            'required' => false,
41
            'info' => 'Código da Situação Tributária referente ao PIS/PASEP',
42
            'format' => ''
43
        ],
44
        'QUANT_BC_PIS' => [
45
            'type' => 'numeric',
46
            'regex' => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => false,
48
            'info' => 'Base de cálculo em quantidade - PIS/PASEP',
49
            'format' => '15v3'
50
        ],
51
        'ALIQ_PIS_QUANT' => [
52
            'type' => 'numeric',
53
            'regex' => '^\d+(\.\d*)?|\.\d+$',
54
            'required' => false,
55
            'info' => 'Alíquota do PIS/PASEP (em reais)',
56
            'format' => '15v4'
57
        ],
58
        'VL_PIS' => [
59
            'type' => 'numeric',
60
            'regex' => '^\d+(\.\d*)?|\.\d+$',
61
            'required' => false,
62
            'info' => 'Valor do PIS/PASEP',
63
            'format' => '15v2'
64
        ],
65
        'CST_COFINS' => [
66
            'type' => 'numeric',
67
            'regex' => '^((0[1-9])|49|99)$',
68
            'required' => false,
69
            'info' => 'Código da Situação Tributária referente a COFINS',
70
            'format' => ''
71
        ],
72
        'QUANT_BC_COFINS' => [
73
            'type' => 'numeric',
74
            'regex' => '^\d+(\.\d*)?|\.\d+$',
75
            'required' => false,
76
            'info' => 'Base de cálculo em quantidade – COFINS',
77
            'format' => '15v3'
78
        ],
79
        'ALIQ_COFINS_QUANT' => [
80
            'type' => 'numeric',
81
            'regex' => '^\d+(\.\d*)?|\.\d+$',
82
            'required' => false,
83
            'info' => 'Alíquota da COFINS (em reais)',
84
            'format' => '15v4'
85
        ],
86
        'VL_COFINS' => [
87
            'type' => 'numeric',
88
            'regex' => '^\d+(\.\d*)?|\.\d+$',
89
            'required' => false,
90
            'info' => 'Valor da COFINS',
91
            'format' => '15v2'
92
        ],
93
        'COD_CTA' => [
94
            'type' => 'string',
95
            'regex' => '^.{0,255}$',
96
            'required' => false,
97
            'info' => 'Código da conta analítica contábil debitada/creditada',
98
            'format' => ''
99
        ],
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

src/Elements/Contribuicoes/Z0150.php 1 location

@@ 9-112 (lines=104) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z0150 extends Element implements ElementInterface
10
{
11
    const REG = '0150';
12
    const LEVEL = 3;
13
    const PARENT = '0100';
14
15
    protected $parameters = [
16
        'COD_PART' => [
17
            'type' => 'string',
18
            'regex' => '^.{0,60}$',
19
            'required' => false,
20
            'info' => 'Código de identificação do participante no arquivo.',
21
            'format' => ''
22
        ],
23
        'NOME' => [
24
            'type' => 'string',
25
            'regex' => '^.{0,100}$',
26
            'required' => false,
27
            'info' => 'Nome pessoal ou empresarial do participante.',
28
            'format' => ''
29
        ],
30
        'COD_PAIS' => [
31
            'type' => 'numeric',
32
            'regex' => '^(\d{0,5})$',
33
            'required' => false,
34
            'info' => 'Código do país do participante, conforme a tabela indicada no item 3.2.1.',
35
            'format' => ''
36
        ],
37
        'CNPJ' => [
38
            'type' => 'string',
39
            'regex' => '^[0-9]{14}$',
40
            'required' => false,
41
            'info' => 'CNPJ do participante.',
42
            'format' => ''
43
        ],
44
        'CPF' => [
45
            'type' => 'string',
46
            'regex' => '^[0-9]{11}$',
47
            'required' => false,
48
            'info' => 'CPF do participante.',
49
            'format' => ''
50
        ],
51
        'IE' => [
52
            'type' => 'string',
53
            'regex' => '^[0-9]{2,14}$',
54
            'required' => false,
55
            'info' => 'Inscrição Estadual do participante.',
56
            'format' => ''
57
        ],
58
        'COD_MUN' => [
59
            'type' => 'numeric',
60
            'regex' => '^(\d{7})$',
61
            'required' => false,
62
            'info' => 'Código do município, conforme a tabela IBGE',
63
            'format' => ''
64
        ],
65
        'SUFRAMA' => [
66
            'type' => 'string',
67
            'regex' => '^.{9}$',
68
            'required' => false,
69
            'info' => 'Número de inscrição do participante na Suframa',
70
            'format' => ''
71
        ],
72
        'END' => [
73
            'type' => 'string',
74
            'regex' => '^.{0,60}$',
75
            'required' => false,
76
            'info' => 'Logradouro e endereço do imóvel',
77
            'format' => ''
78
        ],
79
        'NUM' => [
80
            'type' => 'string',
81
            'regex' => '^(.*)$',
82
            'required' => false,
83
            'info' => 'Número do imóvel',
84
            'format' => ''
85
        ],
86
        'COMPL' => [
87
            'type' => 'string',
88
            'regex' => '^.{0,60}$',
89
            'required' => false,
90
            'info' => 'Dados complementares do endereço',
91
            'format' => ''
92
        ],
93
        'BAIRRO' => [
94
            'type' => 'string',
95
            'regex' => '^.{0,60}$',
96
            'required' => false,
97
            'info' => 'Bairro em que o imóvel está situado',
98
            'format' => ''
99
        ],
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

src/Elements/ICMSIPI/C165.php 1 location

@@ 15-118 (lines=104) @@
12
 * revendedoras) em operações de saída. Postos de combustíveis não devem apresentar este registro.
13
 * @package NFePHP\EFD\Elements\ICMSIPI
14
 */
15
class C165 extends Element implements ElementInterface
16
{
17
    const REG = 'C165';
18
    const LEVEL = 3;
19
    const PARENT = 'C100';
20
21
    protected $parameters = [
22
        'COD_PART' => [
23
            'type' => 'string',
24
            'regex' => '^[A-z0-9]{1,60}$',
25
            'required' => false,
26
            'info' => 'Código do participante',
27
            'format' => ''
28
        ],
29
        'VEIC_ID' => [
30
            'type' => 'string',
31
            'regex' => '^[A-Z]{3}[\d]{1}[\dA-Z]{1}[\d]{2}$',
32
            'required' => false,
33
            'info' => 'Placa de identificação do veículo automotor',
34
            'format' => ''
35
        ],
36
        'COD_AUT' => [
37
            'type' => 'string',
38
            'regex' => '^(.*)$',
39
            'required' => false,
40
            'info' => 'Código da autorização fornecido pela SEFAZ (combustíveis)',
41
            'format' => ''
42
        ],
43
        'NR_PASSE' => [
44
            'type' => 'string',
45
            'regex' => '^(.*)$',
46
            'required' => false,
47
            'info' => 'Código da autorização fornecido pela SEFAZ (combustíveis)',
48
            'format' => ''
49
        ],
50
        'HORA' => [
51
            'type' => 'numeric',
52
            'regex' => '^(?:[01]\d|2[0123])(?:[012345]\d)(?:[012345]\d)$',
53
            'required' => false,
54
            'info' => 'Código da autorização fornecido pela SEFAZ (combustíveis)',
55
            'format' => ''
56
        ],
57
        'TEMPER' => [
58
            'type' => 'numeric',
59
            'regex' => '^\d+(\.\d*)?|\.\d+$',
60
            'required' => false,
61
            'info' => 'Temperatura em graus Celsius utilizada para '.
62
                      'quantificação do volume de combustível',
63
            'format' => '3v2'
64
        ],
65
        'QTD_VOL' => [
66
            'type' => 'numeric',
67
            'regex' => '^\d+$',
68
            'required' => false,
69
            'info' => 'Quantidade de volumes transportados',
70
            'format' => ''
71
        ],
72
        'PESO_BRT' => [
73
            'type' => 'numeric',
74
            'regex' => '^\d+(\.\d*)?|\.\d+$',
75
            'required' => false,
76
            'info' => 'Peso bruto dos volumes transportados (em Kg)',
77
            'format' => '10v2'
78
        ],
79
        'PESO_LIQ' => [
80
            'type' => 'numeric',
81
            'regex' => '^\d+(\.\d*)?|\.\d+$',
82
            'required' => false,
83
            'info' => 'Peso líquido dos volumes transportados (em Kg)',
84
            'format' => '10v2'
85
        ],
86
        'NOM_MOT' => [
87
            'type' => 'string',
88
            'regex' => '^.{1,60}$',
89
            'required' => false,
90
            'info' => 'Nome do motorista',
91
            'format' => ''
92
        ],
93
        'CPF' => [
94
            'type' => 'string',
95
            'regex' => '^[0-9]{11}$',
96
            'required' => false,
97
            'info' => 'CPF do motorista',
98
            'format' => ''
99
        ],
100
        'UF_ID' => [
101
            'type' => 'string',
102
            'regex' => '^[A-z]{2}$',
103
            'required' => false,
104
            'info' => 'Sigla da UF da placa do veículo',
105
            'format' => ''
106
        ],
107
    ];
108
109
    /**
110
     * Constructor
111
     * @param \stdClass $std
112
     */
113
    public function __construct(\stdClass $std)
114
    {
115
        parent::__construct(self::REG);
116
        $this->std = $this->standarize($std);
117
    }
118
}
119

src/Elements/ICMSIPI/Z1960.php 1 location

@@ 9-112 (lines=104) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z1960 extends Element implements ElementInterface
10
{
11
    const REG = '1960';
12
    const LEVEL = 2;
13
    const PARENT = '1001';
14
15
    protected $parameters = [
16
        'IND_AP' => [
17
            'type'     => 'integer',
18
            'regex'    => '^\d{2}$',
19
            'required' => true,
20
            'info'     => 'Indicador da sub-apuração por tipo de benefício (conforme tabela 4.7.1)',
21
            'format'   => ''
22
        ],
23
        'G1_01' => [
24
            'type'     => 'numeric',
25
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => true,
27
            'info'     => 'Percentual de crédito presumido',
28
            'format'   => '15v2'
29
        ],
30
        'G1_02' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => true,
34
            'info'     => 'Saídas não incentivadas de PI',
35
            'format'   => '15v2'
36
        ],
37
        'G1_03' => [
38
            'type'     => 'numeric',
39
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => true,
41
            'info'     => 'Saídas incentivadas de PI',
42
            'format'   => '15v2'
43
        ],
44
        'G1_04' => [
45
            'type'     => 'numeric',
46
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => true,
48
            'info'     => 'Saídas incentivadas de PI para fora do Nordeste',
49
            'format'   => '15v2'
50
        ],
51
        'G1_05' => [
52
            'type'     => 'numeric',
53
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
54
            'required' => true,
55
            'info'     => 'Saldo devedor do ICMS antes das deduções do incentivo',
56
            'format'   => '15v2'
57
        ],
58
        'G1_06' => [
59
            'type'     => 'numeric',
60
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
61
            'required' => true,
62
            'info'     => 'Saldo devedor do ICMS relativo à faixa incentivada de PI',
63
            'format'   => '15v2'
64
        ],
65
        'G1_07' => [
66
            'type'     => 'numeric',
67
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
68
            'required' => true,
69
            'info'     => 'Crédito presumido nas saídas incentivadas de PI para fora do Nordeste',
70
            'format'   => '15v2'
71
        ],
72
        'G1_08' => [
73
            'type'     => 'numeric',
74
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
75
            'required' => true,
76
            'info'     => 'Saldo devedor relativo à faixa incentivada de PI após o '
77
            .'crédito presumido nas saídas para fora do Nordeste',
78
            'format'   => '15v2'
79
        ],
80
        'G1_09' => [
81
            'type'     => 'numeric',
82
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
83
            'required' => true,
84
            'info'     => 'Crédito presumido',
85
            'format'   => '15v2'
86
        ],
87
        'G1_10' => [
88
            'type'     => 'numeric',
89
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
90
            'required' => true,
91
            'info'     => 'Dedução de incentivo da Indústria (crédito presumido)',
92
            'format'   => '15v2'
93
        ],
94
        'G1_11' => [
95
            'type'     => 'numeric',
96
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
97
            'required' => true,
98
            'info'     => 'Saldo devedor do ICMS após deduções',
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