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

EvtAdmissao::toNode()   F

Complexity

Conditions 84
Paths > 20000

Size

Total Lines 1188

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 7140

Importance

Changes 0
Metric Value
dl 0
loc 1188
ccs 0
cts 1129
cp 0
rs 0
c 0
b 0
f 0
cc 84
nc 163577856
nop 0
crap 7140

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 EvtAdmissao Event S-2200 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 EvtAdmissao extends Factory implements FactoryInterface
26
{
27
    /**
28
     * @var string
29
     */
30
    protected $evtName = 'evtAdmissao';
31
    /**
32
     * @var string
33
     */
34
    protected $evtAlias = 'S-2200';
35
    /**
36
     * @var array
37
     */
38
    protected $parameters = [];
39
    
40
    //Trait que contêm os métodos construtores das versões diferentes ainda ativas
41
    //quando uma versão for desativada o metodo correspondente pode e deve ser removido
42
    use Traits\TraitS2200;
43
44
    /**
45
     * Constructor
46
     *
47
     * @param string $config
48
     * @param stdClass $std
49
     * @param Certificate $certificate | null
50
     * @param string $date
51
     */
52
    public function __construct(
53
        $config,
54
        stdClass $std,
55
        Certificate $certificate = null,
56
        $date = ''
57
    ) {
58
        parent::__construct($config, $std, $certificate, $date);
59
    }
60
}
61