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

EvtExpRisco::v020402()   F

Complexity

Conditions 18
Paths 16

Size

Total Lines 238

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 342

Importance

Changes 0
Metric Value
dl 0
loc 238
ccs 0
cts 233
cp 0
rs 3.8933
c 0
b 0
f 0
cc 18
nc 16
nop 0
crap 342

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