Code Duplication    Length = 35-36 lines in 2 locations

src/Elements/I051.php 1 location

@@ 13-48 (lines=36) @@
10
 * Elemento I051 do Bloco I OBRIGATÓRIO [0:N]
11
 * REGISTRO I051: PLANO DE CONTAS REFERENCIAL
12
 */
13
class I051 extends Element implements ElementInterface
14
{
15
    const REG = 'I051';
16
    const LEVEL = 4;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'cod_ccus'     => [
21
            'type'     => 'string',
22
            'regex'    => '^[A-Za-z0-9]$',
23
            'required' => false,
24
            'info'     => 'Codigo do Centro de Custo.',
25
            'format'   => ''
26
        ],
27
        'cod_cta_ref'  => [
28
            'type'     => 'string',
29
            'regex'    => '^[A-Za-z0-9]$',
30
            'required' => true,
31
            'info'     => 'Codigo da conta de acordo com Plano de Contas referencial, '
32
                . 'conforme tabela publicada pelos orgaos indicados no campo '
33
                . 'COD_PLAN_REF do registro 0000.',
34
            'format'   => ''
35
        ]
36
    ];
37
38
    /**
39
     * Constructor
40
     * @param \stdClass $std
41
     */
42
    public function __construct(\stdClass $std)
43
    {
44
        parent::__construct(self::REG);
45
        $this->std = $this->standarize($std);
46
        $this->postValidation();
47
    }
48
}
49

src/Elements/I052.php 1 location

@@ 13-47 (lines=35) @@
10
 * Elemento I052 do Bloco I OBRIGATÓRIO [0:N]
11
 * REGISTRO I052: INDICAÇÃO DOS CÓDIGOS DE AGLUTINAÇÃO
12
 */
13
class I052 extends Element implements ElementInterface
14
{
15
    const REG = 'I052';
16
    const LEVEL = 4;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'cod_ccus'     => [
21
            'type'     => 'string',
22
            'regex'    => '^[A-Za-z0-9]$',
23
            'required' => false,
24
            'info'     => 'Codigo do Centro de Custo.',
25
            'format'   => ''
26
        ],
27
        'cod_agl'  => [
28
            'type'     => 'string',
29
            'regex'    => '^[A-Za-z0-9]$',
30
            'required' => true,
31
            'info'     => 'Codigo de aglutinacao utilizado nas demonstracoes '
32
                . 'contabeis do bloco J (somente para as contas analiticas).',
33
            'format'   => ''
34
        ]
35
    ];
36
37
    /**
38
     * Constructor
39
     * @param \stdClass $std
40
     */
41
    public function __construct(\stdClass $std)
42
    {
43
        parent::__construct(self::REG);
44
        $this->std = $this->standarize($std);
45
        $this->postValidation();
46
    }
47
}
48