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

EvtTabEstab::toNode()   F

Complexity

Conditions 23
Paths 9222

Size

Total Lines 263

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 552

Importance

Changes 0
Metric Value
dl 0
loc 263
ccs 0
cts 248
cp 0
rs 0
c 0
b 0
f 0
cc 23
nc 9222
nop 0
crap 552

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 EvtTabEstab Event S-1005 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\FactoryInterface;
22
use stdClass;
23
24
class EvtTabEstab extends Factory implements FactoryInterface
25
{
26
    /**
27
     * @var int
28
     */
29
    public $sequencial;
30
31
    /**
32
     * @var string
33
     */
34
    protected $evtName = 'evtTabEstab';
35
36
    /**
37
     * @var string
38
     */
39
    protected $evtAlias = 'S-1005';
40
41
    /**
42
     * Parameters patterns
43
     *
44
     * @var array
45
     */
46
    protected $parameters = [];
47
    
48
    //Trait que contêm os métodos construtores das versões diferentes ainda ativas
49
    //quando uma versão for desativada o metodo correspondente pode e deve ser removido
50
    use Traits\TraitS1005;
51
52
    /**
53
     * Constructor
54
     *
55
     * @param string $config
56
     * @param stdClass $std
57
     * @param Certificate $certificate
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