| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Session implements SessionInterface |
||
| 11 | { |
||
| 12 | public function __construct() |
||
| 13 | { |
||
| 14 | if (session_status() == PHP_SESSION_NONE) { |
||
| 15 | session_start(); |
||
| 16 | } |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $key |
||
| 21 | * |
||
| 22 | * @return mixed |
||
| 23 | */ |
||
| 24 | public function get($key) |
||
| 25 | { |
||
| 26 | if (isset($_SESSION[$key])) { |
||
| 27 | return $_SESSION[$key]; |
||
| 28 | } |
||
| 29 | |||
| 30 | return null; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $key |
||
| 35 | * @param mixed $value |
||
| 36 | */ |
||
| 37 | public function set($key, $value) |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $key |
||
| 44 | */ |
||
| 45 | public function delete($key) |
||
| 49 | } |
||
| 50 | } |
||
| 52 |