| Total Complexity | 7 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Session extends BaseHandler implements StoreManager |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * {@inheritDoc} |
||
| 20 | */ |
||
| 21 | public function init(string $cartId, array $options = []): bool |
||
| 22 | { |
||
| 23 | if (session_status() === PHP_SESSION_DISABLED) { |
||
| 24 | 2 | return false; |
|
| 25 | } |
||
| 26 | |||
| 27 | if (session_status() === PHP_SESSION_NONE) { |
||
| 28 | 2 | session_start(); |
|
| 29 | } |
||
| 30 | |||
| 31 | 2 | return parent::init($cartId, $options); |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritDoc} |
||
| 36 | */ |
||
| 37 | public function has(): bool |
||
| 38 | { |
||
| 39 | 2 | return isset($_SESSION[$this->key()]); |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritDoc} |
||
| 44 | */ |
||
| 45 | public function read(): array |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritDoc} |
||
| 52 | */ |
||
| 53 | public function remove(): void |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * {@inheritDoc} |
||
| 60 | */ |
||
| 61 | protected function write(array $value): void |
||
| 64 | } |
||
| 65 | } |
||
| 66 |