Passed
Branch main (57af8c)
by Osvaldo
10:01
created
Category
index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 session_start();
4 4
 require_once __DIR__ . '/vendor/autoload.php';
5 5
 
6
-define('SESSION_ID','ahau3333hauhsuhs');
7
-define('SESSION_CREACION','duiehiuwhuih3333wu');
6
+define('SESSION_ID', 'ahau3333hauhsuhs');
7
+define('SESSION_CREACION', 'duiehiuwhuih3333wu');
8 8
 define('SESSION_CADUCIDAD', 'idjeifiefiehiih4i4i5i5hh');
9 9
 define('CADUCIDAD_DE_SESION', 3600);
10 10
 
Please login to merge, or discard this patch.
src/Sesion.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 
10 10
 class Sesion
11 11
 {
12
-    public function __construct
13
-    (
12
+    public function __construct(
14 13
         SesionId $sesionId
15 14
     )
16 15
     {   
Please login to merge, or discard this patch.
src/RevisarSesion.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     private function existeId(): bool
29 29
     {
30
-        if(!isset($_SESSION[SESSION_ID]))
30
+        if (!isset($_SESSION[SESSION_ID]))
31 31
         {
32 32
             return false;
33 33
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     private function idEstaVacia(): bool
39 39
     {
40
-        if(empty($_SESSION[SESSION_ID]))
40
+        if (empty($_SESSION[SESSION_ID]))
41 41
         {
42 42
             return false;
43 43
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     private function idEsValido(): bool
49 49
     {
50
-        if(!$this->_validarId->validar($_SESSION[SESSION_ID]))
50
+        if (!$this->_validarId->validar($_SESSION[SESSION_ID]))
51 51
         {
52 52
             return false;
53 53
         }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     
58 58
     private function caduco(): bool
59 59
     {
60
-        if((time() - $_SESSION[SESSION_CREACION]) > $_SESSION[SESSION_CADUCIDAD])
60
+        if ((time() - $_SESSION[SESSION_CREACION]) > $_SESSION[SESSION_CADUCIDAD])
61 61
         {
62 62
             return false;
63 63
         }
Please login to merge, or discard this patch.
src/SesionId.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     private function estaVacio(string $string): void
28 28
     {
29
-        if(empty($string))
29
+        if (empty($string))
30 30
         {
31 31
             throw new Exception("El ID de sesión no puede estar vacío"); 
32 32
         }
Please login to merge, or discard this patch.