@@ -8,17 +8,17 @@ |
||
8 | 8 | |
9 | 9 | require_once __DIR__ . '/vendor/autoload.php'; |
10 | 10 | |
11 | -use src\{CuestionarioEts,AcontecimientoTraumaticoSevero, Afectacion, EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento, RecuerdosPersistentesSobreElAcontecimiento}; |
|
11 | +use src\{CuestionarioEts, AcontecimientoTraumaticoSevero, Afectacion, EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento, RecuerdosPersistentesSobreElAcontecimiento}; |
|
12 | 12 | |
13 | 13 | use src\CrearCuestionarioEts; |
14 | 14 | |
15 | -$ets = new AcontecimientoTraumaticoSevero('No','No','No','No','No','No'); |
|
15 | +$ets = new AcontecimientoTraumaticoSevero('No', 'No', 'No', 'No', 'No', 'No'); |
|
16 | 16 | |
17 | 17 | $cuestionario = new CuestionarioEts( |
18 | 18 | $ets, |
19 | - new RecuerdosPersistentesSobreElAcontecimiento($ets,'Sí', 'No'), |
|
20 | - new EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento($ets,'Sí','No','No','No','No','No','No'), |
|
21 | - new Afectacion($ets,'Sí','No','No','No','No') |
|
19 | + new RecuerdosPersistentesSobreElAcontecimiento($ets, 'Sí', 'No'), |
|
20 | + new EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento($ets, 'Sí', 'No', 'No', 'No', 'No', 'No', 'No'), |
|
21 | + new Afectacion($ets, 'Sí', 'No', 'No', 'No', 'No') |
|
22 | 22 | ); |
23 | 23 | echo '<h1>Crear Cuestionario a partir de forma regular</h1>'; |
24 | 24 | echo '<pre>'; |
@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | private $_pregunta19; |
14 | 14 | private $_pregunta20; |
15 | 15 | |
16 | - public function __construct |
|
17 | - ( |
|
16 | + public function __construct( |
|
18 | 17 | AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero, |
19 | 18 | string $pregunta16, |
20 | 19 | string $pregunta17, |
@@ -58,9 +57,9 @@ discard block |
||
58 | 57 | |
59 | 58 | private function setPregunta(string $respuesta): string |
60 | 59 | { |
61 | - if($this->existeRespuestaPositivaEnETS()) |
|
60 | + if ($this->existeRespuestaPositivaEnETS()) |
|
62 | 61 | { |
63 | - if($this->verificarRespuesta($respuesta)) |
|
62 | + if ($this->verificarRespuesta($respuesta)) |
|
64 | 63 | { |
65 | 64 | return $respuesta; |
66 | 65 | } |
@@ -77,7 +76,7 @@ discard block |
||
77 | 76 | private function verificarRespuesta(string $respuesta): bool |
78 | 77 | { |
79 | 78 | |
80 | - if($respuesta == 'Sí' || $respuesta == 'No') |
|
79 | + if ($respuesta == 'Sí' || $respuesta == 'No') |
|
81 | 80 | { |
82 | 81 | return true; |
83 | 82 | } |
@@ -99,9 +98,9 @@ discard block |
||
99 | 98 | 'pregunta6' |
100 | 99 | ); |
101 | 100 | |
102 | - foreach($respuestasETS as $respuesta) |
|
101 | + foreach ($respuestasETS as $respuesta) |
|
103 | 102 | { |
104 | - if($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
103 | + if ($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
105 | 104 | { |
106 | 105 | return true; |
107 | 106 | } |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | private $_pregunta14; |
16 | 16 | private $_pregunta15; |
17 | 17 | |
18 | - public function __construct |
|
19 | - ( |
|
18 | + public function __construct( |
|
20 | 19 | AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero, |
21 | 20 | string $pregunta9, |
22 | 21 | string $pregunta10, |
@@ -74,9 +73,9 @@ discard block |
||
74 | 73 | |
75 | 74 | private function setPregunta(string $respuesta): string |
76 | 75 | { |
77 | - if($this->existeRespuestaPositivaEnETS()) |
|
76 | + if ($this->existeRespuestaPositivaEnETS()) |
|
78 | 77 | { |
79 | - if($this->verificarRespuesta($respuesta)) |
|
78 | + if ($this->verificarRespuesta($respuesta)) |
|
80 | 79 | { |
81 | 80 | return $respuesta; |
82 | 81 | } |
@@ -92,7 +91,7 @@ discard block |
||
92 | 91 | |
93 | 92 | private function verificarRespuesta(string $respuesta): bool |
94 | 93 | { |
95 | - if($respuesta == 'Sí' || $respuesta == 'No') |
|
94 | + if ($respuesta == 'Sí' || $respuesta == 'No') |
|
96 | 95 | { |
97 | 96 | return true; |
98 | 97 | } |
@@ -114,9 +113,9 @@ discard block |
||
114 | 113 | 'pregunta6' |
115 | 114 | ); |
116 | 115 | |
117 | - foreach($respuestasETS as $respuesta) |
|
116 | + foreach ($respuestasETS as $respuesta) |
|
118 | 117 | { |
119 | - if($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
118 | + if ($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
120 | 119 | { |
121 | 120 | return true; |
122 | 121 | } |
@@ -10,8 +10,7 @@ discard block |
||
10 | 10 | private $_pregunta7; |
11 | 11 | private $_pregunta8; |
12 | 12 | |
13 | - public function __construct |
|
14 | - ( |
|
13 | + public function __construct( |
|
15 | 14 | AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero, |
16 | 15 | string $pregunta7, |
17 | 16 | string $pregunta8 |
@@ -34,9 +33,9 @@ discard block |
||
34 | 33 | |
35 | 34 | private function setPregunta(string $respuesta): string |
36 | 35 | { |
37 | - if($this->existeRespuestaPositivaEnETS()) |
|
36 | + if ($this->existeRespuestaPositivaEnETS()) |
|
38 | 37 | { |
39 | - if($this->verificarRespuesta($respuesta)) |
|
38 | + if ($this->verificarRespuesta($respuesta)) |
|
40 | 39 | { |
41 | 40 | return $respuesta; |
42 | 41 | } |
@@ -52,7 +51,7 @@ discard block |
||
52 | 51 | |
53 | 52 | private function verificarRespuesta(string $respuesta): bool |
54 | 53 | { |
55 | - if($respuesta == 'Sí' || $respuesta == 'No') |
|
54 | + if ($respuesta == 'Sí' || $respuesta == 'No') |
|
56 | 55 | { |
57 | 56 | return true; |
58 | 57 | } |
@@ -74,9 +73,9 @@ discard block |
||
74 | 73 | 'pregunta6' |
75 | 74 | ); |
76 | 75 | |
77 | - foreach($respuestasETS as $respuesta) |
|
76 | + foreach ($respuestasETS as $respuesta) |
|
78 | 77 | { |
79 | - if($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
78 | + if ($this->_acontecimientoTraumaticoSevero->{$respuesta}() == 'Sí') |
|
80 | 79 | { |
81 | 80 | return true; |
82 | 81 | } |