| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 12 | public function register() |
||
| 13 | { |
||
| 14 | Auth::provider(NativeSessionUserProvider::class, function () { |
||
| 15 | return $this->app->make(NativeSessionUserProvider::class); |
||
| 16 | }); |
||
| 17 | |||
| 18 | Auth::extend(NativeSessionGuard::class, function (Container $app) { |
||
| 19 | return $app->make(NativeSessionGuard::class); |
||
| 20 | }); |
||
| 21 | |||
| 22 | $this->app->singleton(SessionRetriever::class, function () { |
||
| 23 | $config = $this->app->make(Repository::class); |
||
| 24 | |||
| 25 | $path = $config->get('auth.guards.php.storage'); |
||
| 26 | |||
| 27 | $domain = $config->get('auth.guards.php.domain'); |
||
| 28 | |||
| 29 | return new SessionRetriever($path, $domain); |
||
| 30 | }); |
||
| 34 |