| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | 6 | public function create(array $tokenAttrs): Model |
|
| 12 | { |
||
| 13 | 6 | $tokenAttrs['token_type'] = 'Bearer'; |
|
| 14 | |||
| 15 | 6 | if (isset($tokenAttrs['expires_in'])) { |
|
| 16 | 6 | $tokenAttrs['expires_at'] = Carbon::now()->addSeconds($tokenAttrs['expires_in']); |
|
| 17 | } |
||
| 18 | |||
| 19 | 6 | return Token::create($tokenAttrs); |
|
|
|
|||
| 20 | } |
||
| 50 |