Code Duplication    Length = 26-29 lines in 10 locations

src/Elements/I001.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I001 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I001: ABERTURA DO BLOCO I
12
 */
13
class I001 extends Element implements ElementInterface
14
{
15
    const REG = 'I001';
16
    const LEVEL = 1;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'ind_dad' => [
21
            'type'     => 'numeric',
22
            'regex'    => '^[0-1]{1}$',
23
            'required' => true,
24
            'info'     => '0 - Bloco com dados informados;1- Bloco sem dadosinformados.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/I300.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I300 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I300: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class I300 extends Element implements ElementInterface
14
{
15
    const REG = 'I300';
16
    const LEVEL = 3;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'dt_bcte'     => [
21
            'type'     => 'string',
22
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
23
            'required' => true,
24
            'info'     => 'Data do balancete.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/I350.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I350 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I350: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class I350 extends Element implements ElementInterface
14
{
15
    const REG = 'I350';
16
    const LEVEL = 3;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'dt_res'     => [
21
            'type'     => 'string',
22
            'regex'    => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$',
23
            'required' => true,
24
            'info'     => 'Data da apuração do resultado.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/I500.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I500 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I500: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class I500 extends Element implements ElementInterface
14
{
15
    const REG = 'I500';
16
    const LEVEL = 3;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'tam_fonte' => [
21
            'type'     => 'numeric',
22
            'regex'    => '^[0-9]{2}$',
23
            'required' => true,
24
            'info'     => 'Tamanho da fonte.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/I550.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I550 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I550: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class I550 extends Element implements ElementInterface
14
{
15
    const REG = 'I550';
16
    const LEVEL = 3;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'rz_cont' => [
21
            'type'     => 'string',
22
            'regex'    => '^[A-Za-z0-9]$',
23
            'required' => false,
24
            'info'     => 'Conteúdo dos campos mencionados no Registro I510.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/I555.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento I555 do Bloco I OBRIGATÓRIO [1:1]
11
 * REGISTRO I555: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class I555 extends Element implements ElementInterface
14
{
15
    const REG = 'I555';
16
    const LEVEL = 4;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'rz_cont_tot' => [
21
            'type'     => 'string',
22
            'regex'    => '^[A-Za-z0-9]$',
23
            'required' => false,
24
            'info'     => 'Conteúdo dos campos mencionados no Registro I510.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/Z0001.php 1 location

@@ 18-43 (lines=26) @@
15
 * NOTA: usada a letra Z no nome da Classe pois os nomes não podem ser exclusivamente
16
 * numeréricos e também para não confundir os com elementos do bloco B
17
 */
18
class Z0001 extends Element implements ElementInterface
19
{
20
    const REG = '0001';
21
    const LEVEL = 1;
22
    const PARENT = '0000';
23
    
24
    protected $parameters = [
25
        'ind_dad' => [
26
            'type'     => 'numeric',
27
            'regex'    => '^[0-1]{1}$',
28
            'required' => true,
29
            'info'     => 'Indicador de movimento: 0- Bloco com dados informados; 1- Bloco sem dados informados.',
30
            'format'   => ''
31
        ]
32
    ];
33
    
34
    /**
35
     * Constructor
36
     * @param \stdClass $std
37
     */
38
    public function __construct(\stdClass $std)
39
    {
40
        parent::__construct(self::REG);
41
        $this->std = $this->standarize($std);
42
    }
43
}
44

src/Elements/C001.php 1 location

@@ 13-41 (lines=29) @@
10
 * Elemento C001 do Bloco C OBRIGATÓRIO [1:1]
11
 * REGISTRO C001: ABERTURA DO BLOCO C
12
 */
13
class C001 extends Element implements ElementInterface
14
{
15
    const REG = 'C001';
16
    const LEVEL = 1;
17
    const PARENT = '';
18
19
    protected $parameters =
20
    [
21
        'ind_dad' =>
22
        [
23
            'type'     => 'numeric',
24
            'regex'    => '^[0-1]{1}$',
25
            'required' => true,
26
            'info'     => '0 - Bloco com dados informados;1- Bloco sem dadosinformados.',
27
            'format'   => ''
28
        ]
29
    ];
30
31
    /**
32
     * Constructor
33
     * @param \stdClass $std
34
     */
35
    public function __construct(\stdClass $std)
36
    {
37
        parent::__construct(self::REG);
38
        $this->std = $this->standarize($std);
39
        $this->postValidation();
40
    }
41
}
42

src/Elements/J001.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento J001 do Bloco J OBRIGATÓRIO [1:1]
11
 * REGISTRO J001: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class J001 extends Element implements ElementInterface
14
{
15
    const REG = 'J001';
16
    const LEVEL = 1;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'ind_dad' => [
21
            'type'     => 'numeric',
22
            'regex'    => '^[0-1]{1}$',
23
            'required' => true,
24
            'info'     => 'Indicador de movimento: 0- Bloco com dados informados; 1- Bloco sem dados informados.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40

src/Elements/K001.php 1 location

@@ 13-39 (lines=27) @@
10
 * Elemento K001 do Bloco K OBRIGATÓRIO [1:1]
11
 * REGISTRO K001: ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE EMPRESÁRIA
12
 */
13
class K001 extends Element implements ElementInterface
14
{
15
    const REG = 'K001';
16
    const LEVEL = 1;
17
    const PARENT = '';
18
19
    protected $parameters = [
20
        'ind_dad' => [
21
            'type'     => 'numeric',
22
            'regex'    => '^[0-1]{1}$',
23
            'required' => true,
24
            'info'     => 'Indicador de movimento: 0- Bloco com dados informados; 1- Bloco sem dados informados.',
25
            'format'   => ''
26
        ]
27
    ];
28
29
    /**
30
     * Constructor
31
     * @param \stdClass $std
32
     */
33
    public function __construct(\stdClass $std)
34
    {
35
        parent::__construct(self::REG);
36
        $this->std = $this->standarize($std);
37
        $this->postValidation();
38
    }
39
}
40