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

EvtPgtos::toNode()   F

Complexity

Conditions 53
Paths 162

Size

Total Lines 575

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2862

Importance

Changes 0
Metric Value
dl 0
loc 575
ccs 0
cts 569
cp 0
rs 2.92
c 0
b 0
f 0
cc 53
nc 162
nop 0
crap 2862

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 EvtPgtos Event S-1210 constructor
7
 * READ for 2.5.0 layout
8
 *
9
 * @category  NFePHP
10
 * @package   NFePHPSocial
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
use NFePHP\Common\Certificate;
19
use NFePHP\eSocial\Common\Factory;
20
use NFePHP\eSocial\Common\FactoryId;
21
use NFePHP\eSocial\Common\FactoryInterface;
22
use stdClass;
23
24
class EvtPgtos extends Factory implements FactoryInterface
25
{
26
    /**
27
     * @var int
28
     */
29
    public $sequencial;
30
    /**
31
     * @var string
32
     */
33
    protected $evtName = 'evtPgtos';
34
    /**
35
     * @var string
36
     */
37
    protected $evtAlias = 'S-1210';
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\TraitS1210;
48
49
    /**
50
     * Constructor
51
     *
52
     * @param string $config
53
     * @param stdClass $std
54
     * @param Certificate $certificate
55
     */
56
    public function __construct(
57
        $config,
58
        stdClass $std,
59
        Certificate $certificate = null,
60
        $date = ''
61
    ) {
62
        parent::__construct($config, $std, $certificate, $date);
63
    }
64
}
65