| Total Complexity | 6 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | abstract class Token |
||
| 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 | public function __construct(string $token, array $scopes, string $clientIdentifier, ?string $resourceOwnerIdentifier, |
||
| 36 | \DateTimeInterface $expiresAt) |
||
| 37 | { |
||
| 38 | $this->token = $token; |
||
| 39 | $this->scopes = $scopes; |
||
| 40 | $this->clientIdentifier = $clientIdentifier; |
||
| 41 | $this->resourceOwnerIdentifier = $resourceOwnerIdentifier; |
||
| 42 | $this->expiresAt = $expiresAt; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getToken(): string |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string[] |
||
| 55 | */ |
||
| 56 | public function getScopes(): array |
||
| 57 | { |
||
| 58 | return $this->scopes; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getClientIdentifier(): string |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string|null |
||
| 71 | */ |
||
| 72 | public function getResourceOwnerIdentifier(): ?string |
||
| 73 | { |
||
| 74 | return $this->resourceOwnerIdentifier; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return \DateTimeInterface |
||
| 79 | */ |
||
| 80 | public function getExpiresAt(): \DateTimeInterface |
||
| 83 | } |
||
| 84 | } |