Total Complexity | 6 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class RangoDeEdad |
||
7 | { |
||
8 | private string $_rangoDeEdad; |
||
9 | private $_rangos = array( |
||
10 | '15' => 19, |
||
11 | '20' => 24, |
||
12 | '25' => 29, |
||
13 | '30' => 34, |
||
14 | '35' => 39, |
||
15 | '40' => 44, |
||
16 | '45' => 49, |
||
17 | '50' => 54, |
||
18 | '55' => 59, |
||
19 | '60' => 64, |
||
20 | '65' => 69, |
||
21 | '70' => 99 |
||
22 | ); |
||
23 | |||
24 | public function __construct(Edad $Edad) |
||
25 | { |
||
26 | $this->_rangoDeEdad = $this->setRangoDeEdad($Edad->edad()); |
||
27 | } |
||
28 | |||
29 | public function rangoDeEdad(): string |
||
32 | } |
||
33 | |||
34 | private function setRangoDeEdad(int $edad): string |
||
48 | } |
||
49 | } |