Skip to content

Commit 7f3c868

Browse files
committed
spm-131-PRs-stabilization
- Code styling fixes
1 parent 4f99381 commit 7f3c868

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

app/code/Magento/Customer/Controller/Account/LoginPost.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ public function execute()
110110
$message = __('Invalid login or password.');
111111
$this->messageManager->addError($message);
112112
$this->session->setUsername($login['username']);
113-
}
114-
catch (\Exception $e) {
113+
} catch (\Exception $e) {
115114
// PA DSS violation: throwing or logging an exception here can disclose customer password
116115
$this->messageManager->addError(
117116
__('An unspecified error occurred. Please contact us for assistance.')

app/code/Magento/Customer/view/frontend/web/change-email-password.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define([
2929
* @private
3030
*/
3131
_create: function () {
32-
this.element.on('change', $.proxy(function (event) {
32+
this.element.on('change', $.proxy(function () {
3333
this._checkChoice();
3434
}, this));
3535

app/code/Magento/Customer/view/frontend/web/js/password-strength-indicator.js

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
* Copyright © 2015 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/*jshint browser:true*/
5+
6+
/**
7+
* jshint browser:true
8+
*/
69
define([
7-
"jquery",
8-
"Magento_Customer/js/zxcvbn"
9-
], function($, zxcvbn){
10-
"use strict";
11-
10+
'jquery',
11+
'Magento_Customer/js/zxcvbn'
12+
], function ($, zxcvbn) {
13+
'use strict';
14+
1215
$.widget('mage.passwordStrengthIndicator', {
1316
options: {
1417
defaultClassName: 'password-strength-meter-',
@@ -19,15 +22,15 @@ define([
1922
* Widget initialization
2023
* @private
2124
*/
22-
_create: function() {
25+
_create: function () {
2326
this._bind();
2427
},
2528

2629
/**
2730
* Event binding, will monitor scroll and resize events (resize events left for backward compat)
2831
* @private
2932
*/
30-
_bind: function() {
33+
_bind: function () {
3134
this._on({
3235
'change input[type="password"]': this._calculateStrength,
3336
'keyup input[type="password"]': this._calculateStrength,
@@ -39,19 +42,20 @@ define([
3942
* Calculate password strength
4043
* @private
4144
*/
42-
_calculateStrength: function() {
43-
var password = this._getPassword();
44-
var score = zxcvbn(password).score;
45-
var className = this._getClassName(score);
45+
_calculateStrength: function () {
46+
var password = this._getPassword(),
47+
score = zxcvbn(password).score,
48+
className = this._getClassName(score);
49+
4650
this._displayStrength(className);
4751
},
4852

4953
/**
5054
* Display strength
51-
* @param className
55+
* @param {String} className
5256
* @private
5357
*/
54-
_displayStrength: function(className) {
58+
_displayStrength: function (className) {
5559
this.element.find('#' + this.options.passwordSrengthMeterId).removeClass();
5660
this.element.find('#' + this.options.passwordSrengthMeterId).addClass(className);
5761
},
@@ -61,20 +65,20 @@ define([
6165
* @returns {*}
6266
* @private
6367
*/
64-
_getPassword: function() {
68+
_getPassword: function () {
6569
return this.element.find('input[type="password"]').val();
6670
},
6771

6872
/**
6973
* Get class name for score
70-
* @param score
71-
* @returns {string}
74+
* @param {int} score
75+
* @returns {String}
7276
* @private
7377
*/
74-
_getClassName: function(score) {
78+
_getClassName: function (score) {
7579
return this.options.defaultClassName + score;
7680
}
7781
});
78-
82+
7983
return $.mage.passwordStrengthIndicator;
8084
});

0 commit comments

Comments
 (0)