Skip to content

Commit cee765e

Browse files
author
Stanislav Idolov
authored
ENGCOM-2542: [Backport] Fixed a couple of spelling mistakes #17139
2 parents fb347f7 + ecbeb83 commit cee765e

File tree

16 files changed

+36
-41
lines changed

16 files changed

+36
-41
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
1414
/**
1515
* @var string
1616
*/
17-
protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
17+
protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
1818
}

app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getElementHtml()
104104
*/
105105
public function getImages()
106106
{
107-
return $this->registry->registry('current_product')->getData('media_gallery') ?: null;
107+
return $this->getDataObject()->getData('media_gallery') ?: null;
108108
}
109109

110110
/**

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,11 +618,11 @@ public function testReindex($productChanged, $isScheduled, $productFlatCount, $c
618618
*/
619619
public function getProductReindexProvider()
620620
{
621-
return array(
621+
return [
622622
'set 1' => [true, false, 1, 1],
623623
'set 2' => [true, true, 1, 0],
624624
'set 3' => [false, false, 1, 0]
625-
);
625+
];
626626
}
627627

628628
public function testPriceReindexCallback()

app/code/Magento/Catalog/view/adminhtml/web/js/product/weight-handler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ define([
6464
},
6565

6666
/**
67-
* Has weight swither
67+
* Has weight switcher
6868
* @returns {*}
6969
*/
70-
hasWeightSwither: function () {
70+
hasWeightSwitcher: function () {
7171
return this.$weightSwitcher().is(':visible');
7272
},
7373

@@ -104,7 +104,7 @@ define([
104104
'Magento_Catalog/js/product/weight-handler': function () {
105105
this.bindAll();
106106

107-
if (this.hasWeightSwither()) {
107+
if (this.hasWeightSwitcher()) {
108108
this.switchWeight();
109109
}
110110
},

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,27 +167,24 @@ public function execute()
167167
'This account is not confirmed. <a href="%1">Click here</a> to resend confirmation email.',
168168
$value
169169
);
170-
$this->messageManager->addError($message);
171-
$this->session->setUsername($login['username']);
172170
} catch (UserLockedException $e) {
173171
$message = __(
174172
'Invalid login or password.'
175173
);
176-
$this->messageManager->addError($message);
177-
$this->session->setUsername($login['username']);
178174
} catch (AuthenticationException $e) {
179175
$message = __('Invalid login or password.');
180-
$this->messageManager->addError($message);
181-
$this->session->setUsername($login['username']);
182176
} catch (LocalizedException $e) {
183177
$message = $e->getMessage();
184-
$this->messageManager->addError($message);
185-
$this->session->setUsername($login['username']);
186178
} catch (\Exception $e) {
187179
// PA DSS violation: throwing or logging an exception here can disclose customer password
188180
$this->messageManager->addError(
189181
__('An unspecified error occurred. Please contact us for assistance.')
190182
);
183+
} finally {
184+
if (isset($message)) {
185+
$this->messageManager->addError($message);
186+
$this->session->setUsername($login['username']);
187+
}
191188
}
192189
} else {
193190
$this->messageManager->addError(__('A login and a password are required.'));

app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function testGetProductLinks()
367367
$reflectionOfExtension = new \ReflectionClass('Magento\Catalog\Api\Data\ProductLinkExtension');
368368
$method = $reflectionOfExtension->getMethod('setData');
369369
$method->setAccessible(true);
370-
$method->invokeArgs($groupExtension, array('qty', 1));
370+
$method->invokeArgs($groupExtension, ['qty', 1]);
371371

372372
$outputGroupLink = $this->objectManagerHelper->getObject('Magento\Catalog\Model\ProductLink\Link');
373373
$outputGroupLink->setProductSku("Simple Product 1");

app/code/Magento/Ui/view/base/web/js/lib/core/element/element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ define([
4242
}
4343

4444
/**
45-
* Creates observable propery using 'track' method.
45+
* Creates observable property using 'track' method.
4646
*
4747
* @param {Object} obj - Object to whom property belongs.
4848
* @param {String} key - Key of the property.

dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class AssertWidgetCmsPageLink extends AbstractConstraint
1919
{
2020
/**
21-
* Assert that created widget displayed on frontent on Home page and on Advanced Search and
21+
* Assert that created widget displayed on frontend on Home page and on Advanced Search and
2222
* after click on widget link on frontend system redirects you to cms page.
2323
*
2424
* @param CmsIndex $cmsIndex

dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetOnFrontendInCatalog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
use Magento\Mtf\Constraint\AbstractConstraint;
1414

1515
/**
16-
* Check that created widget displayed on frontent in Catalog.
16+
* Check that created widget displayed on frontend in Catalog.
1717
*/
1818
class AssertWidgetOnFrontendInCatalog extends AbstractConstraint
1919
{
2020
/**
21-
* Assert that created widget displayed on frontent in Catalog.
21+
* Assert that created widget displayed on frontend in Catalog.
2222
*
2323
* @param CmsIndex $cmsIndex
2424
* @param CatalogCategoryView $catalogCategoryView

dev/tests/integration/testsuite/Magento/Framework/App/Utility/_files/fixtures/theme/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
\Magento\Framework\Component\ComponentRegistrar::register(
88
\Magento\Framework\Component\ComponentRegistrar::THEME,
9-
'frontent/Test/theme',
9+
'frontend/Test/theme',
1010
__DIR__
1111
);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
module Magento_Module *
2-
theme frontent/Test/theme One*
2+
theme frontend/Test/theme One*

dev/tests/static/framework/Magento/Sniffs/Less/PropertiesLineBreakSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
4646
}
4747

4848
if ($tokens[$prevPtr]['line'] === $tokens[$stackPtr]['line']) {
49-
$error = 'Each propery must be on a line by itself';
49+
$error = 'Each property must be on a line by itself';
5050
$phpcsFile->addError($error, $stackPtr, 'SameLine');
5151
}
5252
}

lib/web/mage/utils/objects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ define([
8383
* @private
8484
*
8585
* @param {Object} parent - Object from which to remove property.
86-
* @param {Array} path - Splitted path to the propery.
86+
* @param {Array} path - Splitted path to the property.
8787
*/
8888
function removeNested(parent, path) {
8989
var field = path.pop();

lib/web/mage/validation/url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ define([], function () {
4242
/**
4343
* Sanitize url, replacing disallowed chars
4444
*
45-
* @param {Sring} path - url to be normalized
45+
* @param {String} path - url to be normalized
4646
* @returns {String}
4747
*/
4848
sanitize: function (path) {

setup/performance-toolkit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ To get more details about available JMeter options, read [Non-GUI Mode](http://j
114114
For example, you can run the B2C scenario via console with 90 threads for the Frontend Pool and 10 threads for the Admin Pool:
115115

116116
cd {JMeter path}/bin/
117-
jmeter -n -t {path to peformance toolkit}/benchmark.jmx -j ./jmeter.log -l ./jmeter-results.jtl -Jhost=magento2.dev -Jbase_path=/ -Jadmin_path=admin -JfrontendPoolUsers=90 -JadminPoolUsers=10
117+
jmeter -n -t {path to performance toolkit}/benchmark.jmx -j ./jmeter.log -l ./jmeter-results.jtl -Jhost=magento2.dev -Jbase_path=/ -Jadmin_path=admin -JfrontendPoolUsers=90 -JadminPoolUsers=10
118118

119119
As a result, you will get `jmeter.log` and `jmeter-results.jtl`. The`jmeter.log` contains information about the test run and can be helpful in determining the cause of an error. The JTL file is a text file containing the results of a test run. It can be opened in the GUI mode to perform analysis of the results (see the *Output* section below).
120120

setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function scan()
9292
$MACRO_DOC_COMMENT_VALIDATE = function () use (&$docCommentIndex) {
9393
static $validTrailingTokens = null;
9494
if ($validTrailingTokens === null) {
95-
$validTrailingTokens = array(T_WHITESPACE, T_FINAL, T_ABSTRACT, T_INTERFACE, T_CLASS, T_FUNCTION);
95+
$validTrailingTokens = [T_WHITESPACE, T_FINAL, T_ABSTRACT, T_INTERFACE, T_CLASS, T_FUNCTION];
9696
}
9797
if ($docCommentIndex !== false && !in_array($this->tokenType, $validTrailingTokens)) {
9898
$docCommentIndex = false;
@@ -134,14 +134,14 @@ protected function scan()
134134

135135
case T_NAMESPACE:
136136

137-
$infos[$infoIndex] = array(
137+
$infos[$infoIndex] = [
138138
'type' => 'namespace',
139139
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
140140
'tokenEnd' => null,
141141
'lineStart' => $token[2],
142142
'lineEnd' => null,
143143
'namespace' => null,
144-
);
144+
];
145145

146146
// start processing with next token
147147
if ($MACRO_TOKEN_ADVANCE() === false) {
@@ -179,16 +179,15 @@ protected function scan()
179179

180180
case T_USE:
181181

182-
$infos[$infoIndex] = array(
182+
$infos[$infoIndex] = [
183183
'type' => 'use',
184184
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
185185
'tokenEnd' => null,
186186
'lineStart' => $tokens[$tokenIndex][2],
187187
'lineEnd' => null,
188188
'namespace' => $namespace,
189-
'statements' => array(0 => array('use' => null,
190-
'as' => null)),
191-
);
189+
'statements' => [0 => ['use' => null, 'as' => null]],
190+
];
192191

193192
$useStatementIndex = 0;
194193
$useAsContext = false;
@@ -206,8 +205,7 @@ protected function scan()
206205
} elseif ($tokenContent === ',') {
207206
$useAsContext = false;
208207
$useStatementIndex++;
209-
$infos[$infoIndex]['statements'][$useStatementIndex] = array('use' => null,
210-
'as' => null);
208+
$infos[$infoIndex]['statements'][$useStatementIndex] = ['use' => null, 'as' => null];
211209
}
212210
}
213211

@@ -246,22 +244,22 @@ protected function scan()
246244
case T_REQUIRE_ONCE:
247245

248246
// Static for performance
249-
static $includeTypes = array(
247+
static $includeTypes = [
250248
T_INCLUDE => 'include',
251249
T_INCLUDE_ONCE => 'include_once',
252250
T_REQUIRE => 'require',
253251
T_REQUIRE_ONCE => 'require_once'
254-
);
252+
];
255253

256-
$infos[$infoIndex] = array(
254+
$infos[$infoIndex] = [
257255
'type' => 'include',
258256
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
259257
'tokenEnd' => null,
260258
'lineStart' => $tokens[$tokenIndex][2],
261259
'lineEnd' => null,
262260
'includeType' => $includeTypes[$tokens[$tokenIndex][0]],
263261
'path' => '',
264-
);
262+
];
265263

266264
// start processing with next token
267265
if ($MACRO_TOKEN_ADVANCE() === false) {
@@ -296,7 +294,7 @@ protected function scan()
296294
case T_INTERFACE:
297295
case T_TRAIT:
298296

299-
$infos[$infoIndex] = array(
297+
$infos[$infoIndex] = [
300298
'type' => ($this->tokenType === T_FUNCTION) ? 'function' : 'class',
301299
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
302300
'tokenEnd' => null,
@@ -306,7 +304,7 @@ protected function scan()
306304
'uses' => $this->getUsesNoScan($namespace),
307305
'name' => null,
308306
'shortName' => null,
309-
);
307+
];
310308

311309
$classBraceCount = 0;
312310

0 commit comments

Comments
 (0)