| Total Complexity | 8 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class SessionStorage extends Github\Sanity implements ISessionStorage |
||
| 14 | { |
||
| 15 | const SESSION_KEY = 'milo.github-api'; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | private $sessionKey; |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string |
||
| 23 | */ |
||
| 24 | public function __construct($sessionKey = self::SESSION_KEY) |
||
| 25 | { |
||
| 26 | $this->sessionKey = $sessionKey; |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string |
||
| 32 | * @param mixed |
||
| 33 | * @return self |
||
| 34 | */ |
||
| 35 | public function set($name, $value) |
||
| 45 | } |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function get($name) |
||
| 59 | } |
||
| 60 | |||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string |
||
| 64 | * @return self |
||
| 65 | */ |
||
| 66 | public function remove($name) |
||
| 73 | } |
||
| 74 | |||
| 75 | |||
| 76 | /** |
||
| 77 | * @param string |
||
| 78 | */ |
||
| 79 | private function check($method) |
||
| 87 |