Skip to content

Commit 417285d

Browse files
authored
Fix lint errors oct 2023 (#465)
* Lint errors * UnauthorizedTokenException should not be overridden
1 parent 4a4b4dd commit 417285d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

app/code/Meta/BusinessExtension/Api/CustomApiKey/UnauthorizedTokenException.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@
2424

2525
class UnauthorizedTokenException extends \Exception implements GuzzleException
2626
{
27-
public function __construct($message = "Unauthorized Token", $code = 401)
27+
/**
28+
* Construct
29+
*/
30+
public function __construct()
2831
{
29-
parent::__construct($message, $code);
32+
parent::__construct("Unauthorized Token", 401);
3033
}
3134
}

app/code/Meta/BusinessExtension/Block/Adminhtml/Setup.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ public function isCommerceExtensionEnabled()
200200
}
201201

202202
/**
203-
* Whether to enable the pre-onboarding Splash page for the
204-
* new Commerce Extension.
203+
* Whether to enable the pre-onboarding Splash page for the new Commerce Extension.
205204
*
206205
* @return bool
207206
*/

app/code/Meta/BusinessExtension/Model/Api/CustomApiKey/Authenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function __construct(ScopeConfigInterface $scopeConfig, Http $httpRequest
5050
* Authenticate a given token against the stored API key
5151
*
5252
* @param string $token
53-
* @throws UnauthorizedTokenException
5453
* @return void
54+
* @throws UnauthorizedTokenException
5555
*/
5656
public function authenticate(string $token): void
5757
{
@@ -61,9 +61,9 @@ public function authenticate(string $token): void
6161
}
6262
}
6363

64-
6564
/**
6665
* Authenticate a given token against the stored API key
66+
*
6767
* @return void
6868
* @throws UnauthorizedTokenException
6969
*/

app/code/Meta/BusinessExtension/Test/Unit/Api/CustomApiKey/CustomApiKeyTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class CustomApiKeyTest extends TestCase
1616
*/
1717
private ScopeConfigInterface $scopeConfig;
1818

19-
2019
/** @var Http */
2120
private Http $httpRequest;
2221

@@ -68,6 +67,5 @@ public function testAuthenticateApiKeySuccess()
6867
$this->httpRequest
6968
);
7069
$authenticator->authenticateRequest();
71-
7270
}
7371
}

0 commit comments

Comments
 (0)