EliminarSesion   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A eliminarVariablesDeSesion() 0 5 1
A eliminar() 0 3 1
1
<?php
2
namespace src;
3
4
use const SESSION_ID;
5
use const SESSION_CREACION;
6
7
class EliminarSesion
8
{
9
    public function eliminar(): void
10
    {
11
        $this->eliminarVariablesDeSesion();
12
    }
13
14
    private function eliminarVariablesDeSesion()
15
    {
16
        unset($_SESSION[SESSION_ID]);
17
        unset($_SESSION[SESSION_CREACION]);
18
        session_destroy();
19
    }
20
}
21