D301   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
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 26
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
class D301 extends Element implements ElementInterface
10
{
11
    const REG = 'D301';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'NUM_DOC_CANC' => [
17
            'type'     => 'numeric',
18
            'regex'    => '^[0-9]{0,9}$',
19
            'required' => true,
20
            'info'     => 'Número do documento fiscal cancelado',
21
            'format'   => ''
22
        ]
23
    ];
24
25
    /**
26
     * Constructor
27
     * @param \stdClass $std
28
     */
29
    public function __construct(\stdClass $std)
30
    {
31
        parent::__construct(self::REG);
32
        $this->std = $this->standarize($std);
33
    }
34
}
35