Skip to content

Commit d69c0f9

Browse files
magento2-login-as-customer/issues/90: Static tests fix.
1 parent 2004134 commit d69c0f9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

app/code/Magento/LoginAsCustomer/CustomerData/LoginAsCustomer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
/**
1515
* Customer data for the logged_as_customer section
16+
*
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1618
*/
1719
class LoginAsCustomer implements SectionSourceInterface
1820
{
@@ -41,6 +43,7 @@ public function __construct(
4143

4244
/**
4345
* Retrieve private customer data for the logged_as_customer section
46+
*
4447
* @return array
4548
*/
4649
public function getSectionData():array
@@ -50,8 +53,8 @@ public function getSectionData():array
5053
}
5154

5255
return [
53-
'admin_user_id' => $this->customerSession->getLoggedAsCustomerAdmindId(),
54-
'website_name' => $this->storeManager->getWebsite()->getName()
56+
'adminUserId' => $this->customerSession->getLoggedAsCustomerAdmindId(),
57+
'websiteName' => $this->storeManager->getWebsite()->getName()
5558
];
5659
}
5760
}

app/code/Magento/LoginAsCustomer/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "magento/module-login-as-customer",
33
"description": "Allow for admin to enter a customer account",
44
"require": {
5+
"php": "~7.1.3||~7.2.0||~7.3.0",
56
"magento/framework": "*",
67
"magento/module-backend": "*",
78
"magento/module-checkout": "*",
@@ -19,7 +20,6 @@
1920
"OSL-3.0",
2021
"AFL-3.0"
2122
],
22-
"version": "2.2.1",
2323
"autoload": {
2424
"files": [ "registration.php" ],
2525
"psr-4": {

app/code/Magento/LoginAsCustomer/view/frontend/web/js/view/loginAsCustomer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ define([
2323

2424
this.customer = customerData.get('customer');
2525
this.loginAsCustomer = customerData.get('loggedAsCustomer');
26-
this.isVisible(this.loginAsCustomer().admin_user_id);
26+
this.isVisible(this.loginAsCustomer().adminUserId);
2727

2828
this.notificationText = $.mage.__('You are connected as <strong>%1</strong> on %2')
2929
.replace('%1', this.customer().fullname)
30-
.replace('%2', this.loginAsCustomer().website_name);
30+
.replace('%2', this.loginAsCustomer().websiteName);
3131
},
3232

3333
/** @inheritdoc */

0 commit comments

Comments
 (0)