Z1250::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 5
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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, '
21
            .'na forma prevista na legislação, referente às hipóteses de restituição em que há previsão deste crédito.',
22
            'format'   => '15v2'
23
        ],
24
        'VL_ICMS_ST_REST' => [
25
            'type'     => 'numeric',
26
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
27
            'required' => true,
28
            'info'     => 'Informar o valor total do ICMS/ST que o informante tem direito ao crédito, na forma '
29
            .'prevista na legislação, referente às hipóteses de restituição em que há previsão deste crédito.',
30
            'format'   => '15v2'
31
        ],
32
        'VL_FCP_ST_REST' => [
33
            'type'     => 'numeric',
34
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
35
            'required' => true,
36
            'info'     => 'Informar o valor total do FCP_ST agregado ao valor do ICMS/ST informado no '
37
            .'campo VL_ICMS_ST_REST.',
38
            'format'   => '15v2'
39
        ],
40
        'VL_ICMS_ST_COMPL' => [
41
            'type'     => 'numeric',
42
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
43
            'required' => true,
44
            'info'     => 'Informar o valor total do débito referente ao complemento do imposto, Nos casos '
45
            .'previstos na legislação.',
46
            'format'   => '15v2'
47
        ],
48
        'VL_FCP_ST_COMPL' => [
49
            'type'     => 'numeric',
50
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
51
            'required' => true,
52
            'info'     => 'Informar o valor total do FCP_ST agregado ao valor informado no campo VL_ICMS_ST_COMPL',
53
            'format'   => '15v2'
54
        ]
55
    ];
56
57
    /**
58
     * Constructor
59
     * @param \stdClass $std
60
     */
61
    public function __construct(\stdClass $std)
62
    {
63
        parent::__construct(self::REG);
64
        $this->std = $this->standarize($std);
65
    }
66
}
67