C172   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 40
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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
/**
10
 * REGISTRO C172: OPERAÇÕES COM ISSQN (CÓDIGO 01)
11
 * Este registro tem por objetivo informar dados da prestação de serviços
12
 * @package NFePHP\EFD\Elements\ICMSIPI
13
 */
14
class C172 extends Element implements ElementInterface
15
{
16
    const REG = 'C172';
17
    const LEVEL = 4;
18
    const PARENT = 'C170';
19
20
    protected $parameters = [
21
        'VL_BC_ISSQN' => [
22
            'type' => 'numeric',
23
            'regex' => '^\d+(\.\d*)?|\.\d+$',
24
            'required' => false,
25
            'info' => 'Valor da base de cálculo do ISSQN',
26
            'format' => '15v2'
27
        ],
28
        'ALIQ_ISSQN' => [
29
            'type' => 'numeric',
30
            'regex' => '^\d+(\.\d*)?|\.\d+$',
31
            'required' => false,
32
            'info' => 'Alíquota do ISSQN',
33
            'format' => '6v2'
34
        ],
35
        'VL_ISSQN' => [
36
            'type' => 'numeric',
37
            'regex' => '^\d+(\.\d*)?|\.\d+$',
38
            'required' => false,
39
            'info' => 'Valor do ISSQN',
40
            'format' => '15v2'
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