1 | <?php |
||
23 | class CreateAccessTokenCommand |
||
24 | { |
||
25 | /** |
||
26 | * @var AccessTokenId |
||
27 | */ |
||
28 | private $accessTokenId; |
||
29 | |||
30 | /** |
||
31 | * @var \DateTimeImmutable |
||
32 | */ |
||
33 | private $expiresAt; |
||
34 | |||
35 | /** |
||
36 | * @var ClientId |
||
37 | */ |
||
38 | private $clientId; |
||
39 | |||
40 | /** |
||
41 | * @var UserAccountId |
||
42 | */ |
||
43 | private $resourceOwnerId; |
||
44 | |||
45 | /** |
||
46 | * @var DataBag |
||
47 | */ |
||
48 | private $parameters; |
||
49 | |||
50 | /** |
||
51 | * @var DataBag |
||
52 | */ |
||
53 | private $metadatas; |
||
54 | |||
55 | /** |
||
56 | * @var null|ResourceServerId |
||
57 | */ |
||
58 | private $resourceServerId; |
||
59 | |||
60 | /** |
||
61 | * CreateAccessTokenCommand constructor. |
||
62 | * |
||
63 | * @param AccessTokenId $accessTokenId |
||
64 | * @param ClientId $clientId |
||
65 | * @param ResourceOwnerId $resourceOwnerId |
||
66 | * @param \DateTimeImmutable $expiresAt |
||
67 | * @param DataBag $parameters |
||
68 | * @param DataBag $metadatas |
||
69 | * @param null|ResourceServerId $resourceServerId |
||
70 | */ |
||
71 | protected function __construct(AccessTokenId $accessTokenId, ClientId $clientId, ResourceOwnerId $resourceOwnerId, \DateTimeImmutable $expiresAt, DataBag $parameters, DataBag $metadatas, ?ResourceServerId $resourceServerId) |
||
81 | |||
82 | /** |
||
83 | * @param AccessTokenId $accessTokenId |
||
84 | * @param ClientId $clientId |
||
85 | * @param ResourceOwnerId $resourceOwnerId |
||
86 | * @param \DateTimeImmutable $expiresAt |
||
87 | * @param DataBag $parameters |
||
88 | * @param DataBag $metadatas |
||
89 | * @param null|ResourceServerId $resourceServerId |
||
90 | * |
||
91 | * @return CreateAccessTokenCommand |
||
|
|||
92 | */ |
||
93 | public static function create(AccessTokenId $accessTokenId, ClientId $clientId, ResourceOwnerId $resourceOwnerId, \DateTimeImmutable $expiresAt, DataBag $parameters, DataBag $metadatas, ?ResourceServerId $resourceServerId): self |
||
97 | |||
98 | /** |
||
99 | * @return ClientId |
||
100 | */ |
||
101 | public function getClientId(): ClientId |
||
105 | |||
106 | /** |
||
107 | * @return ResourceOwnerId |
||
108 | */ |
||
109 | public function getResourceOwnerId(): ResourceOwnerId |
||
113 | |||
114 | /** |
||
115 | * @return DataBag |
||
116 | */ |
||
117 | public function getParameters(): DataBag |
||
121 | |||
122 | /** |
||
123 | * @return DataBag |
||
124 | */ |
||
125 | public function getMetadatas(): DataBag |
||
129 | |||
130 | /** |
||
131 | * @return null|ResourceServerId |
||
132 | */ |
||
133 | public function getResourceServerId(): ?ResourceServerId |
||
137 | |||
138 | /** |
||
139 | * @return AccessTokenId |
||
140 | */ |
||
141 | public function getAccessTokenId(): AccessTokenId |
||
145 | |||
146 | /** |
||
147 | * @return \DateTimeImmutable |
||
148 | */ |
||
149 | public function getExpiresAt(): \DateTimeImmutable |
||
153 | } |
||
154 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.