1 | <?php |
||
22 | abstract class AbstractAuthorizationCode implements AuthorizationCode |
||
23 | { |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $queryParameters; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $redirectUri; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $used; |
||
38 | |||
39 | /** |
||
40 | * @var \DateTimeImmutable |
||
41 | */ |
||
42 | private $expiresAt; |
||
43 | |||
44 | /** |
||
45 | * @var ResourceOwnerId |
||
46 | */ |
||
47 | private $userAccountId; |
||
48 | |||
49 | /** |
||
50 | * @var ClientId |
||
51 | */ |
||
52 | private $clientId; |
||
53 | |||
54 | /** |
||
55 | * @var DataBag |
||
56 | */ |
||
57 | private $parameter; |
||
58 | |||
59 | /** |
||
60 | * @var DataBag |
||
61 | */ |
||
62 | private $metadata; |
||
63 | |||
64 | /** |
||
65 | * @var bool |
||
66 | */ |
||
67 | private $revoked; |
||
68 | |||
69 | /** |
||
70 | * @var ResourceServerId|null |
||
71 | */ |
||
72 | private $resourceServerId; |
||
73 | |||
74 | public function __construct(ClientId $clientId, UserAccountId $userAccountId, array $queryParameters, string $redirectUri, \DateTimeImmutable $expiresAt, DataBag $parameter, DataBag $metadata, ?ResourceServerId $resourceServerId) |
||
87 | |||
88 | public function isUsed(): bool |
||
92 | |||
93 | public function markAsUsed(): void |
||
97 | |||
98 | public function getQueryParameters(): array |
||
102 | |||
103 | public function getQueryParameter(string $key) |
||
111 | |||
112 | public function hasQueryParameter(string $key): bool |
||
116 | |||
117 | public function getRedirectUri(): string |
||
121 | |||
122 | public function toArray(): array |
||
128 | |||
129 | public function getExpiresAt(): \DateTimeImmutable |
||
133 | |||
134 | public function hasExpired(): bool |
||
138 | |||
139 | public function getUserAccountId(): UserAccountId |
||
143 | |||
144 | public function getClientId(): ClientId |
||
148 | |||
149 | public function getParameter(): DataBag |
||
153 | |||
154 | public function getMetadata(): DataBag |
||
158 | |||
159 | public function getResourceServerId(): ?ResourceServerId |
||
163 | |||
164 | public function getExpiresIn(): int |
||
173 | |||
174 | public function jsonSerialize() |
||
192 | } |
||
193 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.