Skip to content

Commit 4463a29

Browse files
sivaschenkobl4de
andauthored
LYNX-319: Code review adjustments
Co-authored-by: Rafal Janicki <bloorq@gmail.com>
1 parent 5594611 commit 4463a29

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

app/code/Magento/CustomerGraphQl/Controller/HttpRequestValidator/AuthorizationRequestValidator.php

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,14 @@
3131
*/
3232
class AuthorizationRequestValidator implements HttpRequestValidatorInterface
3333
{
34-
/**
35-
* @var UserTokenReaderInterface
36-
*
37-
* phpcs:disable Magento2.Commenting.ClassPropertyPHPDocFormatting
38-
*/
39-
private readonly UserTokenReaderInterface $userTokenReader;
40-
41-
/**
42-
* @var UserTokenValidatorInterface
43-
*
44-
* phpcs:disable Magento2.Commenting.ClassPropertyPHPDocFormatting
45-
*/
46-
private readonly UserTokenValidatorInterface $userTokenValidator;
47-
4834
/**
4935
* @param UserTokenReaderInterface $tokenReader
5036
* @param UserTokenValidatorInterface $tokenValidator
5137
*/
5238
public function __construct(
53-
UserTokenReaderInterface $tokenReader,
54-
UserTokenValidatorInterface $tokenValidator
39+
private readonly UserTokenReaderInterface $tokenReader,
40+
private readonly UserTokenValidatorInterface $tokenValidator
5541
) {
56-
$this->userTokenReader = $tokenReader;
57-
$this->userTokenValidator = $tokenValidator;
5842
}
5943

6044
/**
@@ -76,8 +60,7 @@ public function validate(HttpRequestInterface $request): void
7660
return;
7761
}
7862

79-
$tokenType = strtolower(reset($headerPieces));
80-
if ($tokenType !== 'bearer') {
63+
if (strtolower(reset($headerPieces)) !== 'bearer') {
8164
return;
8265
}
8366

0 commit comments

Comments
 (0)