| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function clean(Container $app) |
||
| 12 | { |
||
| 13 | if (!$app->offsetExists('session')) { |
||
| 14 | return; |
||
| 15 | } |
||
| 16 | $ref = new \ReflectionObject($app['session']); |
||
| 17 | $drivers = $ref->getProperty('drivers'); |
||
| 18 | $drivers->setAccessible(true); |
||
| 19 | $drivers->setValue($app['session'], []); |
||
| 20 | |||
| 21 | $app->forgetInstance('session.store'); |
||
| 22 | Facade::clearResolvedInstance('session.store'); |
||
| 23 | } |
||
| 24 | } |