Code Duplication    Length = 40-46 lines in 9 locations

src/Elements/Contribuicoes/M605.php 1 location

@@ 9-52 (lines=44) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class M605 extends Element implements ElementInterface
10
{
11
    const REG = 'M605';
12
    const LEVEL = 3;
13
    const PARENT = 'M600';
14
15
    protected $parameters = [
16
        'NUM_CAMPO' => [
17
            'type' => 'string',
18
            'regex' => '^.{2}$',
19
            'required' => false,
20
            'info' => 'Informar o número do campo do registro “M600” (Campo 08 (contribuição não ' .
21
                'registro. ' .
22
                'cumulativa) ou Campo 12 (contribuição cumulativa)), objeto de detalhamento neste ',
23
            'format' => ''
24
        ],
25
        'COD_REC' => [
26
            'type' => 'string',
27
            'regex' => '^.{6}$',
28
            'required' => false,
29
            'info' => 'Informar o código da receita referente à contribuição a recolher, detalhada neste ' .
30
                'registro. ',
31
            'format' => ''
32
        ],
33
        'VL_DEBITO' => [
34
            'type' => 'numeric',
35
            'regex' => '^\d+(\.\d*)?|\.\d+$',
36
            'required' => false,
37
            'info' => 'Valor do Débito correspondente ao código do Campo 03, conforme informação na DCTF. ',
38
            'format' => '15v2'
39
        ],
40
41
    ];
42
43
    /**
44
     * Constructor
45
     * @param \stdClass $std
46
     */
47
    public function __construct(\stdClass $std)
48
    {
49
        parent::__construct(self::REG);
50
        $this->std = $this->standarize($std);
51
    }
52
}
53

src/Elements/Contribuicoes/Z1020.php 1 location

@@ 9-53 (lines=45) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class Z1020 extends Element implements ElementInterface
10
{
11
    const REG = '1020';
12
    const LEVEL = 2;
13
    const PARENT = '0001';
14
15
    protected $parameters = [
16
        'NUM_PROC' => [
17
            'type' => 'string',
18
            'regex' => '^.{0,20}$',
19
            'required' => false,
20
            'info' => 'Identificação do Processo Administrativo ou da Decisão Administrativa ',
21
            'format' => ''
22
        ],
23
        'IND_NAT_ACAO' => [
24
            'type' => 'string',
25
            'regex' => '^(01|02|03|04|05|06|99)$',
26
            'required' => false,
27
            'info' => 'Indicador da Natureza da Ação, decorrente de Processo Administrativo na Secretaria da ' .
28
                'Receita Federal do Brasil ' .
29
                ' 01 – Processo Administrativo de Consulta 02 – Despacho Decisório 03 – Ato ' .
30
                'Declaratório Executivo 04 – Ato Declaratório Interpretativo 05 – Decisão ' .
31
                'Administrativa de DRJ ou do CARF 06 – Auto de Infração 99 – Outros ',
32
            'format' => ''
33
        ],
34
        'DT_DEC_ADM' => [
35
            'type' => 'string',
36
            'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
37
            'required' => false,
38
            'info' => 'Data do Despacho/Decisão Administrativa ',
39
            'format' => ''
40
        ],
41
42
    ];
43
44
    /**
45
     * Constructor
46
     * @param \stdClass $std
47
     */
48
    public function __construct(\stdClass $std)
49
    {
50
        parent::__construct(self::REG);
51
        $this->std = $this->standarize($std);
52
    }
53
}
54

src/Elements/ICMSIPI/H005.php 1 location

@@ 29-74 (lines=46) @@
26
 *
27
 * Atribuir valor Zero ao inventário significa escriturar sem estoque.
28
 */
29
class H005 extends Element implements ElementInterface
30
{
31
    const REG = 'H005';
32
    const LEVEL = 1;
33
    const PARENT = 'H001';
34
    
35
    protected $parameters = [
36
        'DT_INV' => [
37
            'type'     => 'string',
38
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
39
            'required' => true,
40
            'info'     => 'Data do inventário',
41
            'format'   => ''
42
        ],
43
        'VL_INV' => [
44
            'type'     => 'numeric',
45
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
46
            'required' => true,
47
            'info'     => 'Valor total do estoque',
48
            'format'   => '15v2'
49
        ],
50
        'MOT_INV' => [
51
            'type'     => 'string',
52
            'regex'    => '^(0[1-5]{1})$',
53
            'required' => true,
54
            'info'     => 'Informe o motivo do Inventário: '
55
            . '01 – No final no período; '
56
            . '02 – Na mudança de forma de tributação da mercadoria (ICMS); '
57
            . '03 – Na solicitação da baixa cadastral, paralisação temporária '
58
            . 'e outras situações; '
59
            . '04 – Na alteração de regime de pagamento – condição do contribuinte; '
60
            . '05 – Por determinação dos fiscos.',
61
            'format'   => ''
62
        ]
63
    ];
64
    
65
    /**
66
     * Constructor
67
     * @param \stdClass $std
68
     */
69
    public function __construct(\stdClass $std)
70
    {
71
        parent::__construct(self::REG);
72
        $this->std = $this->standarize($std);
73
    }
74
}
75

src/Elements/ICMSIPI/Z0210.php 1 location

@@ 40-81 (lines=42) @@
37
 * NOTA: usada a letra Z no nome da Classe pois os nomes não podem ser exclusivamente
38
 * numeréricos e também para não confundir os com elementos do bloco B
39
 */
40
class Z0210 extends Element implements ElementInterface
41
{
42
    const REG = '0210';
43
    const LEVEL = 3;
44
    const PARENT = '0200';
45
    
46
    protected $parameters = [
47
        'COD_ITEM_COMP' => [
48
            'type'     => 'string',
49
            'regex'    => '^.{1,60}$',
50
            'required' => true,
51
            'info'     => 'Código  do  item  componente/insumo  (campo 02 do Registro 0200)',
52
            'format'   => ''
53
        ],
54
        'QTD_COMP' => [
55
            'type'     => 'numeric',
56
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
57
            'required' => true,
58
            'info'     => 'Quantidade do item componente/insumo para se produzir'
59
                . ' uma unidade do item composto/resultante',
60
            'format'   => '15v6'
61
        ],
62
        'PERDA' => [
63
            'type'     => 'numeric',
64
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
65
            'required' => true,
66
            'info'     => 'Perda/quebra normal percentual do insumo/componente '
67
                . 'para se produzir uma unidade do item composto/resultante',
68
            'format'   => '15v4'
69
        ]
70
    ];
71
    
72
    /**
73
     * Constructor
74
     * @param stdClass $std
75
     */
76
    public function __construct(stdClass $std)
77
    {
78
        parent::__construct(self::REG);
79
        $this->std = $this->standarize($std);
80
    }
81
}
82

src/Elements/ICMSIPI/Z0305.php 1 location

@@ 15-54 (lines=40) @@
12
 * NOTA: usada a letra Z no nome da Classe pois os nomes não podem ser exclusivamente
13
 * numeréricos e também para não confundir os com elementos do bloco B
14
 */
15
class Z0305 extends Element implements ElementInterface
16
{
17
    const REG = '0305';
18
    const LEVEL = 0;
19
    const PARENT = '';
20
    
21
    protected $parameters = [
22
        'COD_CCUS' => [
23
            'type'     => 'string',
24
            'regex'    => '^.{1,60}$',
25
            'required' => true,
26
            'info'     => 'Código do centro de custo',
27
            'format'   => ''
28
        ],
29
        'FUNC' => [
30
            'type'     => 'string',
31
            'regex'    => '^.{1,255}$',
32
            'required' => true,
33
            'info'     => 'Descrição sucinta da função do bem',
34
            'format'   => ''
35
        ],
36
        'VIDA_UTIL' => [
37
            'type'     => 'integer',
38
            'regex'    => '^[0-9]{1,3}$',
39
            'required' => false,
40
            'info'     => 'Vida útil estimada do bem, em número de meses',
41
            'format'   => ''
42
        ],
43
    ];
44
    
45
    /**
46
     * Constructor
47
     * @param stdClass $std
48
     */
49
    public function __construct(stdClass $std)
50
    {
51
        parent::__construct(self::REG);
52
        $this->std = $this->standarize($std);
53
    }
54
}
55

src/Elements/ICMSIPI/Z0600.php 1 location

@@ 16-55 (lines=40) @@
13
 * NOTA: usada a letra Z no nome da Classe pois os nomes não podem ser exclusivamente
14
 * numeréricos e também para não confundir os com elementos do bloco B
15
 */
16
class Z0600 extends Element implements ElementInterface
17
{
18
    const REG = '0600';
19
    const LEVEL = 2;
20
    const PARENT = '';
21
    
22
    protected $parameters = [
23
        'DT_ALT' => [
24
            'type'     => 'string',
25
            'regex'    => '^[0-9]{8}$',
26
            'required' => true,
27
            'info'     => 'Data da inclusão/alteração',
28
            'format'   => ''
29
        ],
30
        'COD_CCUS' => [
31
            'type'     => 'string',
32
            'regex'    => '^.{1,60}$',
33
            'required' => true,
34
            'info'     => 'Código do centro de custo',
35
            'format'   => ''
36
        ],
37
        'CCUS' => [
38
            'type'     => 'string',
39
            'regex'    => '^.{1,60}$',
40
            'required' => true,
41
            'info'     => 'Nome do centro de custo',
42
            'format'   => ''
43
        ],
44
    ];
45
    
46
    /**
47
     * Constructor
48
     * @param stdClass $std
49
     */
50
    public function __construct(stdClass $std)
51
    {
52
        parent::__construct(self::REG);
53
        $this->std = $this->standarize($std);
54
    }
55
}
56

src/Elements/ICMSIPI/K250.php 1 location

@@ 9-48 (lines=40) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class K250 extends Element implements ElementInterface
10
{
11
    const REG = 'K250';
12
    const LEVEL = 3;
13
    const PARENT = 'K100';
14
15
    protected $parameters = [
16
        'DT_PROD' => [
17
            'type'     => 'string',
18
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
19
            'required' => true,
20
            'info'     => 'Data do reconhecimento da produção ocorrida no terceiro',
21
            'format'   => ''
22
        ],
23
        'COD_ITEM' => [
24
            'type'     => 'string',
25
            'regex'    => '^.{1,60}$',
26
            'required' => true,
27
            'info'     => 'Código do item (campo 02 do Registro 0200)',
28
            'format'   => ''
29
        ],
30
        'QTD' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => true,
34
            'info'     => 'Quantidade produzida',
35
            'format'   => '15v3'
36
        ]
37
    ];
38
    
39
    /**
40
     * Constructor
41
     * @param \stdClass $std
42
     */
43
    public function __construct(\stdClass $std)
44
    {
45
        parent::__construct(self::REG);
46
        $this->std = $this->standarize($std);
47
    }
48
}
49

src/Elements/ICMSIPI/K265.php 1 location

@@ 9-48 (lines=40) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class K265 extends Element implements ElementInterface
10
{
11
    const REG = 'K265';
12
    const LEVEL = 4;
13
    const PARENT = 'K260';
14
15
    protected $parameters = [
16
        'COD_ITEM' => [
17
            'type'     => 'string',
18
            'regex'    => '^.{1,60}$',
19
            'required' => true,
20
            'info'     => 'Código do item (campo 02 do Registro 0200)',
21
            'format'   => ''
22
        ],
23
        'QTD_CONS' => [
24
            'type'     => 'numeric',
25
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => false,
27
            'info'     => 'Quantidade consumida – saída do estoque',
28
            'format'   => '15v3'
29
        ],
30
        'QTD_RET' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => false,
34
            'info'     => 'Quantidade retornada – entrada em estoque',
35
            'format'   => '15v3'
36
        ]
37
    ];
38
    
39
    /**
40
     * Constructor
41
     * @param \stdClass $std
42
     */
43
    public function __construct(\stdClass $std)
44
    {
45
        parent::__construct(self::REG);
46
        $this->std = $this->standarize($std);
47
    }
48
}
49

src/Elements/ICMSIPI/K290.php 1 location

@@ 9-48 (lines=40) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class K290 extends Element implements ElementInterface
10
{
11
    const REG = 'K290';
12
    const LEVEL = 3;
13
    const PARENT = 'K100';
14
15
    protected $parameters = [
16
        'DT_INI_OP' => [
17
            'type'     => 'string',
18
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
19
            'required' => false,
20
            'info'     => 'Data de início da ordem de produção',
21
            'format'   => ''
22
        ],
23
        'DT_FIN_OP' => [
24
            'type'     => 'string',
25
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
26
            'required' => false,
27
            'info'     => 'Data de conclusão da ordem de produção',
28
            'format'   => ''
29
        ],
30
        'COD_DOC_OP' => [
31
            'type'     => 'string',
32
            'regex'    => '^.{1,30}$',
33
            'required' => false,
34
            'info'     => 'Código de identificação da ordem de produção',
35
            'format'   => ''
36
        ]
37
    ];
38
    
39
    /**
40
     * Constructor
41
     * @param \stdClass $std
42
     */
43
    public function __construct(\stdClass $std)
44
    {
45
        parent::__construct(self::REG);
46
        $this->std = $this->standarize($std);
47
    }
48
}
49