Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 2 | protected function createTokenRepository(array $config) |
|
35 | { |
||
36 | 2 | $key = $this->app['config']['app.key']; |
|
37 | |||
38 | 2 | if (Str::startsWith($key, 'base64:')) { |
|
39 | 2 | $key = base64_decode(substr($key, 7)); |
|
40 | } |
||
41 | |||
42 | 2 | $connection = $config['connection'] ?? null; |
|
43 | |||
44 | 2 | return new DatabaseTokenRepository( |
|
45 | 2 | $this->app['db']->connection($connection), |
|
46 | 2 | $this->app['hash'], |
|
47 | 2 | $config['table'], |
|
48 | 2 | $key, |
|
49 | 2 | $config['expire'] |
|
50 | ); |
||
58 |