| Total Complexity | 7 |
| Total Lines | 84 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | abstract class Token implements TokenInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $token; |
||
| 18 | /** |
||
| 19 | * @var string[] |
||
| 20 | */ |
||
| 21 | protected $scopes; |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $clientIdentifier; |
||
| 26 | /** |
||
| 27 | * @var string|null |
||
| 28 | */ |
||
| 29 | protected $resourceOwnerIdentifier; |
||
| 30 | /** |
||
| 31 | * @var \DateTimeInterface |
||
| 32 | */ |
||
| 33 | protected $expiresAt; |
||
| 34 | /** |
||
| 35 | * @var string|null |
||
| 36 | */ |
||
| 37 | protected $authorizationCode; |
||
| 38 | |||
| 39 | public function __construct(string $token, array $scopes, string $clientIdentifier, ?string $resourceOwnerIdentifier, |
||
| 40 | \DateTimeInterface $expiresAt, ?string $authorizationCode = null) |
||
| 41 | { |
||
| 42 | $this->token = $token; |
||
| 43 | $this->scopes = $scopes; |
||
| 44 | $this->clientIdentifier = $clientIdentifier; |
||
| 45 | $this->resourceOwnerIdentifier = $resourceOwnerIdentifier; |
||
| 46 | $this->expiresAt = $expiresAt; |
||
| 47 | $this->authorizationCode = $authorizationCode; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getToken(): string |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string[] |
||
| 60 | */ |
||
| 61 | public function getScopes(): array |
||
| 62 | { |
||
| 63 | return $this->scopes; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | public function getClientIdentifier(): string |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return string|null |
||
| 76 | */ |
||
| 77 | public function getResourceOwnerIdentifier(): ?string |
||
| 78 | { |
||
| 79 | return $this->resourceOwnerIdentifier; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return \DateTimeInterface |
||
| 84 | */ |
||
| 85 | public function getExpiresAt(): \DateTimeInterface |
||
| 88 | } |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | public function getAuthorizationCode(): ?string |
||
| 96 | } |
||
| 97 | } |