| Total Complexity | 7 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait TokenUtilTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Get access token. |
||
| 16 | * |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | 4 | public function getAccessToken() |
|
| 20 | { |
||
| 21 | 4 | return $this->access_token; |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get refresh token. |
||
| 26 | * |
||
| 27 | * @return string|null |
||
| 28 | */ |
||
| 29 | 2 | public function getRefreshToken() |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get token type. |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 2 | public function getTokenType() |
|
| 40 | { |
||
| 41 | 2 | return $this->token_type; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Get product. |
||
| 46 | * |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | 1 | public function getProduct() |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get expires at. |
||
| 56 | * |
||
| 57 | * @return string|\Datetime |
||
| 58 | */ |
||
| 59 | 2 | public function getExpiresAt() |
|
| 60 | { |
||
| 61 | 2 | return $this->expires_at; |
|
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Determine if a token is expired. |
||
| 66 | * |
||
| 67 | * @return bool |
||
| 68 | */ |
||
| 69 | 1 | public function isExpired() |
|
| 76 | } |
||
| 77 | } |
||
| 78 |