Skip to content

Commit 4cf22c1

Browse files
author
Volodymyr Zaets
committed
MAGETWO-44563: JS static tests fail on mainline
- Fixed code style
1 parent 02e0378 commit 4cf22c1

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

app/code/Magento/Ui/view/base/web/js/lib/registry/events.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2015 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'underscore',
78
'mageUtils',
@@ -13,11 +14,11 @@ define([
1314
* @constructor
1415
*/
1516
function Events(storage) {
16-
this.id = 0,
17+
this.id = 0;
1718

18-
this.requests = new Map();
19-
this.map = {};
20-
this.storage = storage;
19+
this.requests = new Map();
20+
this.map = {};
21+
this.storage = storage;
2122

2223
_.bindAll(this, '_resolve', '_clear');
2324
}
@@ -28,7 +29,7 @@ define([
2829
/**
2930
* Tries to resolve dependencies affected by the scpecified element.
3031
* @param {String} elem - Elements' name.
31-
* @returns {events} Chainable.
32+
* @returns {Object} Chainable.
3233
*/
3334
resolve: function (elem) {
3435
var pending = this.map[elem];
@@ -44,17 +45,16 @@ define([
4445

4546
/**
4647
* Creates a new request for the specified set
47-
of elements in case some of them wasn't registered yeat.
48-
Otherwise triggers callback immediately.
48+
* of elements in case some of them wasn't registered yeat.
49+
* Otherwise triggers callback immediately.
4950
* @param {Array} elems - Requested elements.
50-
* @param {Function} callback -
51-
Callback that will be triggered as soon as
52-
all of the elements will be registered.
51+
* @param {Object} callback - that will be triggered as soon as
52+
* all of the elements will be registered.
5353
* @returns {events} Chainable.
5454
*/
5555
wait: function (elems, callback) {
5656
var storage = this.storage,
57-
map = this.map;
57+
map = this.map;
5858

5959
if (storage.has(elems)) {
6060
return callback.apply(null, storage.get(elems));
@@ -79,9 +79,9 @@ define([
7979
* @returns {Boolean} Whether specified request was successfully resolved.
8080
*/
8181
_resolve: function (id) {
82-
var request = this.requests.get(id),
83-
elems = request.deps,
84-
storage = this.storage,
82+
var request = this.requests.get(id),
83+
elems = request.deps,
84+
storage = this.storage,
8585
isResolved;
8686

8787
isResolved = storage.has(elems);
@@ -99,8 +99,8 @@ define([
9999
* @param {Number} id - Id of request.
100100
*/
101101
_clear: function (id) {
102-
var map = this.map,
103-
elems = this.requests.get(id).deps;
102+
var map = this.map,
103+
elems = this.requests.get(id).deps;
104104

105105
elems.forEach(function (elem) {
106106
utils.remove(map[elem], id);

lib/web/mage/utils/compare.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ define([
6666
}
6767

6868
/**
69-
*
69+
* @param {String} prefix
70+
* @param {String} part
7071
*/
7172
function getPath(prefix, part) {
7273
return prefix ? prefix + '.' + part : part;
@@ -84,7 +85,7 @@ define([
8485
}
8586

8687
/**
87-
*
88+
* @param {Array} changes
8889
*/
8990
function getContainers(changes) {
9091
var containers = {},
@@ -108,7 +109,11 @@ define([
108109
}
109110

110111
/**
111-
*
112+
* @param {String} path
113+
* @param {String} name
114+
* @param {String} type
115+
* @param {String} newValue
116+
* @param {String} oldValue
112117
*/
113118
function addChange(path, name, type, newValue, oldValue) {
114119
var data;
@@ -130,7 +135,11 @@ define([
130135
}
131136

132137
/**
133-
*
138+
* @param {String} ns
139+
* @param {String} name
140+
* @param {String} type
141+
* @param {String} iterator
142+
* @param {String} placeholder
134143
*/
135144
function setAll(ns, name, type, iterator, placeholder) {
136145
var key;
@@ -156,7 +165,10 @@ define([
156165

157166
/*eslint-disable max-depth*/
158167
/**
159-
*
168+
* @param {Object} old
169+
* @param {Object} current
170+
* @param {String} ns
171+
* @param {String} name
160172
*/
161173
function compare(old, current, ns, name) {
162174
var key,

0 commit comments

Comments
 (0)