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

EvtBasesFGTS::toNode()   F

Complexity

Conditions 28
Paths 3

Size

Total Lines 247

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 812

Importance

Changes 0
Metric Value
dl 0
loc 247
ccs 0
cts 237
cp 0
rs 3.3333
c 0
b 0
f 0
cc 28
nc 3
nop 0
crap 812

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 EvtBasesFGTS Event S-5003 constructor
7
 * Read for 2.5.0 layout
8
 *
9
 * @category  library
10
 * @package   NFePHP\eSocial
11
 * @copyright NFePHP Copyright (c) 2017-2019
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\FactoryInterface;
22
use stdClass;
23
24
class EvtBasesFGTS extends Factory implements FactoryInterface
25
{
26
    /**
27
     * @var int
28
     */
29
    public $sequencial;
30
    /**
31
     * @var string
32
     */
33
    protected $evtName = 'evtBasesFGTS';
34
    /**
35
     * @var string
36
     */
37
    protected $evtAlias = 'S-5003';
38
    /**
39
     * Parameters patterns
40
     *
41
     * @var array
42
     */
43
    protected $parameters = [];
44
    
45
    //Trait que contêm os métodos construtores das versões diferentes ainda ativas
46
    //quando uma versão for desativada o metodo correspondente pode e deve ser removido
47
    use Traits\TraitS5003;
48
49
    /**
50
     * Constructor
51
     *
52
     * @param string $config
53
     * @param stdClass $std
54
     * @param Certificate $certificate | null
55
     * @param string $date
56
     */
57
    public function __construct(
58
        $config,
59
        stdClass $std,
60
        Certificate $certificate = null,
61
        $date = ''
62
    ) {
63
        parent::__construct($config, $std, $certificate, $date);
64
    }
65
}
66