Skip to content

Commit dba248b

Browse files
committed
CABPI-396: Change public methods that are used only inside the class to private
1 parent e37b3c1 commit dba248b

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

app/code/Magento/AdminAdobeIms/Logger/AdminAdobeImsLogger.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,8 @@ public function __construct(
4747
*/
4848
public function error($message, array $context = []): void
4949
{
50-
if ($this->loggingEnabled()) {
50+
if ($this->imsConfig->loggingEnabled()) {
5151
parent::error($message, $context);
5252
}
5353
}
54-
55-
/**
56-
* Check if AdminAdobeIMS Error logging is enabled
57-
*
58-
* @return bool
59-
*/
60-
public function loggingEnabled(): bool
61-
{
62-
return $this->imsConfig->loggingEnabled();
63-
}
6454
}

app/code/Magento/AdminAdobeIms/Model/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function loginByUsername($username): User
5858
* @return bool
5959
* @throws LocalizedException
6060
*/
61-
public function authenticateByUsername(string $username): bool
61+
private function authenticateByUsername(string $username): bool
6262
{
6363
$config = $this->_config->isSetFlag('admin/security/use_case_sensitive_login');
6464
$result = false;
@@ -99,7 +99,7 @@ public function authenticateByUsername(string $username): bool
9999
* @return bool
100100
* @throws AuthenticationException
101101
*/
102-
public function verifyIdentityWithoutPassword(): bool
102+
private function verifyIdentityWithoutPassword(): bool
103103
{
104104
if ((bool)$this->getIsActive() === false) {
105105
throw new AuthenticationException(

app/code/Magento/AdminAdobeIms/Service/ImsCommandValidationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(
5757
* @return string
5858
* @throws LocalizedException
5959
*/
60-
public function emptyValueValidator(string $value): string
60+
private function emptyValueValidator(string $value): string
6161
{
6262
if (trim($value) === '') {
6363
throw new LocalizedException(

app/code/Magento/AdminAdobeIms/Service/ImsOrganizationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private function getCustomerOrganizationList(array $profileRoles): array
8484
* @return string
8585
* @throws AdobeImsOrganizationAuthorizationException
8686
*/
87-
public function validateAndExtractOrganizationId(string $organizationId): string
87+
private function validateAndExtractOrganizationId(string $organizationId): string
8888
{
8989
if (preg_match(self::ORGANIZATION_REGEX, $organizationId, $matches)) {
9090
if (!empty($matches) && isset($matches[1])) {

0 commit comments

Comments
 (0)