Riesgos   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 94
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 31
c 1
b 0
f 0
dl 0
loc 94
ccs 32
cts 32
cp 1
rs 10
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A alucinogenos() 0 3 1
A inhalables() 0 3 1
A tabaco() 0 3 1
A alcohol() 0 3 1
A opiaceos() 0 3 1
A sedantes() 0 3 1
A cocaina() 0 3 1
A __construct() 0 22 1
A cannabis() 0 3 1
A anfetamina() 0 3 1
A otros() 0 3 1
1
<?php declare(strict_types=1);
2
namespace src\riesgos;
3
4
class Riesgos
5
{
6
    private RiesgoTabaco $_tabaco;
7
8
    private RiesgoAlcohol $_alcohol;
9
10
    private RiesgoCannabis $_cannabis;
11
12
    private RiesgoCocaina $_cocaina;
13
14
    private RiesgoAnfetamina $_anfetamina;
15
16
    private RiesgoInhalables $_inhalables;
17
18
    private RiesgoSedantes $_sedantes;
19
20
    private RiesgoAlucinogenos $_alucinogenos;
21
22
    private RiesgoOpiaceos $_opiaceos;
23
24
    private RiesgoOtros $_otros;
25
26 11
    public function __construct(
27
        RiesgoTabaco $riesgoTabaco,
28
        RiesgoAlcohol $riesgoAlcohol,
29
        RiesgoCannabis $riesgoCannabis,
30
        RiesgoCocaina $riesgoCocaina,
31
        RiesgoAnfetamina $riesgoAnfetamina,
32
        RiesgoInhalables $riesgoInhalables,
33
        RiesgoSedantes $riesgoSedantes,
34
        RiesgoAlucinogenos $riesgoAlucinogenos,
35
        RiesgoOpiaceos $riesgoOpiaceos,
36
        RiesgoOtros $riesgoOtros
37
    ) {
38 11
        $this->_tabaco = $riesgoTabaco;
39 11
        $this->_alcohol = $riesgoAlcohol;
40 11
        $this->_cannabis = $riesgoCannabis;
41 11
        $this->_cocaina = $riesgoCocaina;
42 11
        $this->_anfetamina = $riesgoAnfetamina;
43 11
        $this->_inhalables = $riesgoInhalables;
44 11
        $this->_sedantes = $riesgoSedantes;
45 11
        $this->_alucinogenos = $riesgoAlucinogenos;
46 11
        $this->_opiaceos = $riesgoOpiaceos;
47 11
        $this->_otros = $riesgoOtros;
48 11
    }
49
50 2
    public function tabaco(): RiesgoTabaco
51
    {
52 2
        return $this->_tabaco;
53
    }
54
    
55 2
    public function alcohol(): RiesgoAlcohol
56
    {
57 2
        return $this->_alcohol;
58
    }
59
60 2
    public function cannabis(): RiesgoCannabis
61
    {
62 2
        return $this->_cannabis;
63
    }
64
65 2
    public function cocaina(): RiesgoCocaina
66
    {
67 2
        return $this->_cocaina;
68
    }
69
70 2
    public function anfetamina(): RiesgoAnfetamina
71
    {
72 2
        return $this->_anfetamina;
73
    }
74
75 2
    public function inhalables(): RiesgoInhalables
76
    {
77 2
        return $this->_inhalables;
78
    }
79
80 2
    public function sedantes(): RiesgoSedantes
81
    {
82 2
        return $this->_sedantes;
83
    }
84
85 2
    public function alucinogenos(): RiesgoAlucinogenos
86
    {
87 2
        return $this->_alucinogenos;
88
    }
89
90 2
    public function opiaceos(): RiesgoOpiaceos
91
    {
92 2
        return $this->_opiaceos;
93
    }
94
95 2
    public function otros(): RiesgoOtros
96
    {
97 2
        return $this->_otros;
98
    }
99
}
100