Skip to content

[Backport] Fixed a couple of spelling mistakes #17139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function getElementHtml()
*/
public function getImages()
{
return $this->registry->registry('current_product')->getData('media_gallery') ?: null;
return $this->getDataObject()->getData('media_gallery') ?: null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,11 @@ public function testReindex($productChanged, $isScheduled, $productFlatCount, $c
*/
public function getProductReindexProvider()
{
return array(
return [
'set 1' => [true, false, 1, 1],
'set 2' => [true, true, 1, 0],
'set 3' => [false, false, 1, 0]
);
];
}

public function testPriceReindexCallback()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ define([
},

/**
* Has weight swither
* Has weight switcher
* @returns {*}
*/
hasWeightSwither: function () {
hasWeightSwitcher: function () {
return this.$weightSwitcher().is(':visible');
},

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

if (this.hasWeightSwither()) {
if (this.hasWeightSwitcher()) {
this.switchWeight();
}
},
Expand Down
13 changes: 5 additions & 8 deletions app/code/Magento/Customer/Controller/Account/LoginPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,27 +167,24 @@ public function execute()
'This account is not confirmed. <a href="%1">Click here</a> to resend confirmation email.',
$value
);
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (UserLockedException $e) {
$message = __(
'Invalid login or password.'
);
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (AuthenticationException $e) {
$message = __('Invalid login or password.');
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (LocalizedException $e) {
$message = $e->getMessage();
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (\Exception $e) {
// PA DSS violation: throwing or logging an exception here can disclose customer password
$this->messageManager->addError(
__('An unspecified error occurred. Please contact us for assistance.')
);
} finally {
if (isset($message)) {
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
}
}
} else {
$this->messageManager->addError(__('A login and a password are required.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public function testGetProductLinks()
$reflectionOfExtension = new \ReflectionClass('Magento\Catalog\Api\Data\ProductLinkExtension');
$method = $reflectionOfExtension->getMethod('setData');
$method->setAccessible(true);
$method->invokeArgs($groupExtension, array('qty', 1));
$method->invokeArgs($groupExtension, ['qty', 1]);

$outputGroupLink = $this->objectManagerHelper->getObject('Magento\Catalog\Model\ProductLink\Link');
$outputGroupLink->setProductSku("Simple Product 1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define([
}

/**
* Creates observable propery using 'track' method.
* Creates observable property using 'track' method.
*
* @param {Object} obj - Object to whom property belongs.
* @param {String} key - Key of the property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class AssertWidgetCmsPageLink extends AbstractConstraint
{
/**
* Assert that created widget displayed on frontent on Home page and on Advanced Search and
* Assert that created widget displayed on frontend on Home page and on Advanced Search and
* after click on widget link on frontend system redirects you to cms page.
*
* @param CmsIndex $cmsIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
use Magento\Mtf\Constraint\AbstractConstraint;

/**
* Check that created widget displayed on frontent in Catalog.
* Check that created widget displayed on frontend in Catalog.
*/
class AssertWidgetOnFrontendInCatalog extends AbstractConstraint
{
/**
* Assert that created widget displayed on frontent in Catalog.
* Assert that created widget displayed on frontend in Catalog.
*
* @param CmsIndex $cmsIndex
* @param CatalogCategoryView $catalogCategoryView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontent/Test/theme',
'frontend/Test/theme',
__DIR__
);
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module Magento_Module *
theme frontent/Test/theme One*
theme frontend/Test/theme One*
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
}

if ($tokens[$prevPtr]['line'] === $tokens[$stackPtr]['line']) {
$error = 'Each propery must be on a line by itself';
$error = 'Each property must be on a line by itself';
$phpcsFile->addError($error, $stackPtr, 'SameLine');
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/utils/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ define([
* @private
*
* @param {Object} parent - Object from which to remove property.
* @param {Array} path - Splitted path to the propery.
* @param {Array} path - Splitted path to the property.
*/
function removeNested(parent, path) {
var field = path.pop();
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/validation/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define([], function () {
/**
* Sanitize url, replacing disallowed chars
*
* @param {Sring} path - url to be normalized
* @param {String} path - url to be normalized
* @returns {String}
*/
sanitize: function (path) {
Expand Down
2 changes: 1 addition & 1 deletion setup/performance-toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ To get more details about available JMeter options, read [Non-GUI Mode](http://j
For example, you can run the B2C scenario via console with 90 threads for the Frontend Pool and 10 threads for the Admin Pool:

cd {JMeter path}/bin/
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
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

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).

Expand Down
28 changes: 13 additions & 15 deletions setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function scan()
$MACRO_DOC_COMMENT_VALIDATE = function () use (&$docCommentIndex) {
static $validTrailingTokens = null;
if ($validTrailingTokens === null) {
$validTrailingTokens = array(T_WHITESPACE, T_FINAL, T_ABSTRACT, T_INTERFACE, T_CLASS, T_FUNCTION);
$validTrailingTokens = [T_WHITESPACE, T_FINAL, T_ABSTRACT, T_INTERFACE, T_CLASS, T_FUNCTION];
}
if ($docCommentIndex !== false && !in_array($this->tokenType, $validTrailingTokens)) {
$docCommentIndex = false;
Expand Down Expand Up @@ -134,14 +134,14 @@ protected function scan()

case T_NAMESPACE:

$infos[$infoIndex] = array(
$infos[$infoIndex] = [
'type' => 'namespace',
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
'tokenEnd' => null,
'lineStart' => $token[2],
'lineEnd' => null,
'namespace' => null,
);
];

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

case T_USE:

$infos[$infoIndex] = array(
$infos[$infoIndex] = [
'type' => 'use',
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
'tokenEnd' => null,
'lineStart' => $tokens[$tokenIndex][2],
'lineEnd' => null,
'namespace' => $namespace,
'statements' => array(0 => array('use' => null,
'as' => null)),
);
'statements' => [0 => ['use' => null, 'as' => null]],
];

$useStatementIndex = 0;
$useAsContext = false;
Expand All @@ -206,8 +205,7 @@ protected function scan()
} elseif ($tokenContent === ',') {
$useAsContext = false;
$useStatementIndex++;
$infos[$infoIndex]['statements'][$useStatementIndex] = array('use' => null,
'as' => null);
$infos[$infoIndex]['statements'][$useStatementIndex] = ['use' => null, 'as' => null];
}
}

Expand Down Expand Up @@ -246,22 +244,22 @@ protected function scan()
case T_REQUIRE_ONCE:

// Static for performance
static $includeTypes = array(
static $includeTypes = [
T_INCLUDE => 'include',
T_INCLUDE_ONCE => 'include_once',
T_REQUIRE => 'require',
T_REQUIRE_ONCE => 'require_once'
);
];

$infos[$infoIndex] = array(
$infos[$infoIndex] = [
'type' => 'include',
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
'tokenEnd' => null,
'lineStart' => $tokens[$tokenIndex][2],
'lineEnd' => null,
'includeType' => $includeTypes[$tokens[$tokenIndex][0]],
'path' => '',
);
];

// start processing with next token
if ($MACRO_TOKEN_ADVANCE() === false) {
Expand Down Expand Up @@ -296,7 +294,7 @@ protected function scan()
case T_INTERFACE:
case T_TRAIT:

$infos[$infoIndex] = array(
$infos[$infoIndex] = [
'type' => ($this->tokenType === T_FUNCTION) ? 'function' : 'class',
'tokenStart' => $MACRO_TOKEN_LOGICAL_START_INDEX(),
'tokenEnd' => null,
Expand All @@ -306,7 +304,7 @@ protected function scan()
'uses' => $this->getUsesNoScan($namespace),
'name' => null,
'shortName' => null,
);
];

$classBraceCount = 0;

Expand Down