| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 64 | public function id() |
||
| 65 | { |
||
| 66 | // just return any string since the Cookie storage has no idea. |
||
| 67 | if ($this instanceof \Pimf\Session\Storages\Cookie) { |
||
| 68 | return Character::random(40); |
||
| 69 | } |
||
| 70 | |||
| 71 | // we'll find an random ID here. |
||
| 72 | do { |
||
| 73 | $session = $this->load($key = Character::random(40)); |
||
| 74 | } while ($session !== null); |
||
| 75 | |||
| 76 | return $key; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |