1919use Magento \AdobeImsApi \Api \OrganizationMembershipInterface ;
2020use Magento \Framework \App \RequestInterface ;
2121use Magento \Framework \Exception \AuthenticationException ;
22+ use Magento \Framework \Exception \AuthorizationException ;
2223
2324/**
2425 * Adobe IMS Auth Model for getting Admin Token
@@ -68,7 +69,7 @@ class AdobeImsAdminTokenUserService
6869 /**
6970 * @var TokenResponseInterfaceFactory
7071 */
71- private $ tokenResponseFactory ;
72+ private TokenResponseInterfaceFactory $ tokenResponseFactory ;
7273
7374 /**
7475 * @param ImsConfig $adminImsConfig
@@ -107,7 +108,7 @@ public function __construct(
107108 * @return void
108109 * @throws AdobeImsAuthorizationException
109110 * @throws AdobeImsOrganizationAuthorizationException
110- * @throws AuthenticationException
111+ * @throws AuthenticationException|AuthorizationException
111112 */
112113 public function processLoginRequest (bool $ isReauthorize = false ): void
113114 {
@@ -141,10 +142,10 @@ public function processLoginRequest(bool $isReauthorize = false): void
141142 /**
142143 * Get requested token using Authorization header
143144 *
144- * @return \Magento\AdobeImsApi\Api\Data\ TokenResponseInterface
145+ * @return TokenResponseInterface
145146 * @throws AuthenticationException
146147 */
147- private function getRequestedToken ()
148+ private function getRequestedToken (): TokenResponseInterface
148149 {
149150 $ authorizationHeaderValue = $ this ->request ->getHeader ('Authorization ' );
150151 if (!$ authorizationHeaderValue ) {
@@ -171,9 +172,11 @@ private function getRequestedToken()
171172 * @param bool $isReauthorize
172173 * @param TokenResponseInterface $tokenResponse
173174 * @return void
175+ * @throws AdobeImsAuthorizationException
174176 * @throws AuthenticationException
177+ * @throws AuthorizationException
175178 */
176- private function getLoggedIn (bool $ isReauthorize , TokenResponseInterface $ tokenResponse )
179+ private function getLoggedIn (bool $ isReauthorize , TokenResponseInterface $ tokenResponse ): void
177180 {
178181 $ profile = $ this ->profile ->getProfile ($ tokenResponse ->getAccessToken ());
179182 if (empty ($ profile ['email ' ])) {
0 commit comments