Passed
Push — main ( 7c410c...cd0506 )
by Osvaldo
02:33 queued 01:13
created
Index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@
 block discarded – undo
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
-$ets = new AcontecimientoTraumaticoSevero('No','No','No','No','No','No');
13
+$ets = new AcontecimientoTraumaticoSevero('No', 'No', 'No', 'No', 'No', 'No');
14 14
 
15 15
 $cuestionario = new CuestionarioEts(
16 16
     $ets,
17
-    new RecuerdosPersistentesSobreElAcontecimiento($ets,'Sí', 'No'),
18
-    new EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento($ets,'Sí','No','No','No','No','No','No'),
19
-    new Afectacion($ets,'Sí','No','No','No','No')
17
+    new RecuerdosPersistentesSobreElAcontecimiento($ets, 'Sí', 'No'),
18
+    new EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento($ets, 'Sí', 'No', 'No', 'No', 'No', 'No', 'No'),
19
+    new Afectacion($ets, 'Sí', 'No', 'No', 'No', 'No')
20 20
 );
21 21
 echo '<pre>';
22 22
 var_dump($cuestionario);
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
src/Afectacion.php 2 patches
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
     private $_pregunta4;
14 14
     private $_pregunta5;
15 15
    
16
-    public function __construct
17
-    (
16
+    public function __construct(
18 17
         AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero,
19 18
         string $pregunta1,
20 19
         string $pregunta2,
@@ -58,9 +57,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
             {
65 65
                 return $respuesta;
66 66
             }
67
-        }
68
-        else
67
+        } else
69 68
         {
70 69
             return 'No';
71 70
         }
Please login to merge, or discard this patch.
src/CuestionarioEts.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
 
20 20
     private $_afectacion;
21 21
     
22
-    public function __construct
23
-    (
22
+    public function __construct(
24 23
         AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero,
25 24
         RecuerdosPersistentesSobreElAcontecimiento $RecuerdosPersistentesSobreElAcontecimiento,
26 25
         EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento $EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento,
Please login to merge, or discard this patch.
src/AcontecimientoTraumaticoSevero.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
     private $_pregunta5;
13 13
     private $_pregunta6;
14 14
 
15
-    public function __construct
16
-    (
15
+    public function __construct(
17 16
         string $pregunta1,
18 17
         string $pregunta2,
19 18
         string $pregunta3,
@@ -62,7 +61,7 @@  discard block
 block discarded – undo
62 61
 
63 62
     private function setPregunta(string $respuesta): string
64 63
     {
65
-        if($this->verificarRespuesta($respuesta))
64
+        if ($this->verificarRespuesta($respuesta))
66 65
         {
67 66
             return $respuesta;
68 67
         }
@@ -73,7 +72,7 @@  discard block
 block discarded – undo
73 72
 
74 73
     private function verificarRespuesta(string $respuesta): bool
75 74
     {
76
-        if($respuesta == 'Sí' || $respuesta == 'No')
75
+        if ($respuesta == 'Sí' || $respuesta == 'No')
77 76
         {
78 77
             return true;
79 78
         }
Please login to merge, or discard this patch.
src/EsfuerzoPorEvitarCircunstanciasParecidasOAsociadasAlAcontecimiento.php 2 patches
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
     private $_pregunta6;
16 16
     private $_pregunta7;
17 17
 
18
-    public function __construct
19
-    (
18
+    public function __construct(
20 19
         AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero,
21 20
         string $pregunta1,
22 21
         string $pregunta2,
@@ -74,9 +73,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
             {
65 65
                 return $respuesta;
66 66
             }
67
-        }
68
-        else
67
+        } else
69 68
         {
70 69
             return 'No';
71 70
         }
Please login to merge, or discard this patch.
src/RecuerdosPersistentesSobreElAcontecimiento.php 2 patches
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
     private $_pregunta1;
11 11
     private $_pregunta2;
12 12
     
13
-    public function __construct
14
-    (
13
+    public function __construct(
15 14
         AcontecimientoTraumaticoSevero $AcontecimientoTraumaticoSevero,
16 15
         string $pregunta1,
17 16
         string $pregunta2
@@ -34,9 +33,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
             {
65 65
                 return $respuesta;
66 66
             }
67
-        }
68
-        else
67
+        } else
69 68
         {
70 69
             return 'No';
71 70
         }
Please login to merge, or discard this patch.