Completed
Push — master ( 2973a2...01fa63 )
by Roberto
04:58 queued 02:26
created

EvtDeslig::toNode()   F

Complexity

Conditions 52
Paths 576

Size

Total Lines 593

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2756

Importance

Changes 0
Metric Value
dl 0
loc 593
ccs 0
cts 586
cp 0
rs 0.4711
c 0
b 0
f 0
cc 52
nc 576
nop 0
crap 2756

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace NFePHP\eSocial\Factories;
4
5
/**
6
 * Class eSocial EvtDeslig Event S-2299 constructor
7
 * Read for 2.5.0 layout
8
 *
9
 * @category  library
10
 * @package   NFePHP\eSocial
11
 * @copyright NFePHP Copyright (c) 2018
12
 * @license   http://www.gnu.org/licenses/lgpl.txt LGPLv3+
13
 * @license   https://opensource.org/licenses/MIT MIT
14
 * @license   http://www.gnu.org/licenses/gpl.txt GPLv3+
15
 * @author    Roberto L. Machado <linux.rlm at gmail dot com>
16
 * @link      http://github.com/nfephp-org/sped-esocial for the canonical source repository
17
 */
18
19
use NFePHP\Common\Certificate;
20
use NFePHP\eSocial\Common\Factory;
21
use NFePHP\eSocial\Common\FactoryId;
22
use NFePHP\eSocial\Common\FactoryInterface;
23
use stdClass;
24
25
class EvtDeslig extends Factory implements FactoryInterface
26
{
27
    /**
28
     * @var int
29
     */
30
    public $sequencial;
31
    /**
32
     * @var string
33
     */
34
    protected $evtName = 'evtDeslig';
35
    /**
36
     * @var string
37
     */
38
    protected $evtAlias = 'S-2299';
39
    /**
40
     * Parameters patterns
41
     *
42
     * @var array
43
     */
44
    protected $parameters = [];
45
    
46
    //Trait que contêm os métodos construtores das versões diferentes ainda ativas
47
    //quando uma versão for desativada o metodo correspondente pode e deve ser removido
48
    use Traits\TraitS2299;
49
50
    /**
51
     * Constructor
52
     *
53
     * @param string $config
54
     * @param stdClass $std
55
     * @param Certificate $certificate | null
56
     * @param string $date
57
     */
58
    public function __construct(
59
        $config,
60
        stdClass $std,
61
        Certificate $certificate = null,
62
        $date = ''
63
    ) {
64
        parent::__construct($config, $std, $certificate, $date);
65
    }
66
}
67