Completed
Pull Request — master (#464)
by
unknown
14:04
created

Z1250::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
dl 5
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace NFePHP\EFD\Elements\ICMSIPI;
4
5
use NFePHP\EFD\Common\Element;
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9 View Code Duplication
class Z1250 extends Element implements ElementInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    const REG = '1250';
12
    const LEVEL = 2;
13
    const PARENT = '1001';
14
15
    protected $parameters = [
16
        'VL_CREDITO_ICMS_OP' => [
17
            'type'     => 'numeric',
18
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
19
            'required' => true,
20
            'info'     => 'Informar o valor total do ICMS operação própria que o informante tem direito ao crédito, na forma prevista na legislação, referente às hipóteses de restituição em que há previsão deste crédito.',
21
            'format'   => '15v2'
22
        ],
23
        'VL_ICMS_ST_REST' => [
24
            'type'     => 'numeric',
25
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
26
            'required' => true,
27
            'info'     => 'Informar o valor total do ICMS/ST que o informante tem direito ao crédito, na forma prevista na legislação, referente às hipóteses de restituição em que há previsão deste crédito.',
28
            'format'   => '15v2'
29
        ],
30
        'VL_FCP_ST_REST' => [
31
            'type'     => 'numeric',
32
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
33
            'required' => true,
34
            'info'     => 'Informar o valor total do FCP_ST agregado ao valor do ICMS/ST informado no campo VL_ICMS_ST_REST.',
35
            'format'   => '15v2'
36
        ],
37
        'VL_ICMS_ST_COMPL' => [
38
            'type'     => 'numeric',
39
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
40
            'required' => true,
41
            'info'     => 'Informar o valor total do débito referente ao complemento do imposto, Nos casos previstos na legislação.',
42
            'format'   => '15v2'
43
        ],
44
        'VL_FCP_ST_COMPL' => [
45
            'type'     => 'numeric',
46
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
47
            'required' => true,
48
            'info'     => 'Informar o valor total do FCP_ST agregado ao valor informado no campo VL_ICMS_ST_COMPL',
49
            'format'   => '15v2'
50
        ]
51
    ];
52
53
    /**
54
     * Constructor
55
     * @param \stdClass $std
56
     */
57
    public function __construct(\stdClass $std)
58
    {
59
        parent::__construct(self::REG);
60
        $this->std = $this->standarize($std);
61
    }
62
63
}
64