Test Failed
Push — master ( 88ea0f...5ac8de )
by Roberto
03:16 queued 14s
created

EvtAltContratual::toNode()   F

Complexity

Conditions 32
Paths 864

Size

Total Lines 407

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 1056

Importance

Changes 0
Metric Value
dl 0
loc 407
ccs 0
cts 394
cp 0
rs 0.1511
c 0
b 0
f 0
cc 32
nc 864
nop 0
crap 1056

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 EvtAltContratual Event S-2206 constructor
7
 * Read for 2.5.0 layout
8
 *
9
 * @category  library
10
 * @package   NFePHP\eSocial
11
 * @copyright NFePHP Copyright (c) 2017
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 EvtAltContratual extends Factory implements FactoryInterface
26
{
27
    /**
28
     * @var int
29
     */
30
    public $sequencial;
31
    /**
32
     * @var string
33
     */
34
    protected $evtName = 'evtAltContratual';
35
    /**
36
     * @var string
37
     */
38
    protected $evtAlias = 'S-2206';
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\TraitS2206;
49
50
51
    /**
52
     * Constructor
53
     *
54
     * @param string $config
55
     * @param stdClass $std
56
     * @param Certificate $certificate | null
57
     * @param string $date
58
     */
59
    public function __construct(
60
        $config,
61
        stdClass $std,
62
        Certificate $certificate = null,
63
        $date = ''
64
    ) {
65
        parent::__construct($config, $std, $certificate, $date);
66
    }
67
}
68