Test Failed
Push — master ( 5ac8de...2973a2 )
by Roberto
03:08 queued 40s
created

EvtAdmPrelim::toNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 51

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 31
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 51
ccs 31
cts 31
cp 1
rs 9.069
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1

How to fix   Long Method   

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