Skip to content

Commit 8ba6426

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MQE-1611
2 parents d9c1a88 + a9eb7d8 commit 8ba6426

File tree

28 files changed

+355
-70
lines changed

28 files changed

+355
-70
lines changed

app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
</td>
155155
<td class="col-discont">
156156
<?php if ($block->canShowPriceInfo($_item)) : ?>
157-
<?= $block->escapeHtml($block->displayPriceAttribute('discount_amount')) ?>
157+
<?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
158158
<?php else : ?>
159159
&nbsp;
160160
<?php endif; ?>

app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ private function addAttributeToFilterAllStores(Attribute $attributeModel, array
8484
$entity = $this->getEntity();
8585
$fKey = 'e.' . $this->getEntityPkName($entity);
8686
$pKey = $tableName . '.' . $this->getEntityPkName($entity);
87+
$attributeId = $attributeModel->getAttributeId();
8788
$condition = "({$pKey} = {$fKey}) AND ("
8889
. $this->_getConditionSql("{$tableName}.value", $condition)
90+
. ') AND ('
91+
. $this->_getConditionSql("{$tableName}.attribute_id", $attributeId)
8992
. ')';
9093
$selectExistsInAllStores = $this->getConnection()->select()->from($tableName);
9194
$this->getSelect()->exists($selectExistsInAllStores, $condition);

dev/tests/integration/framework/Magento/TestFramework/App/MutableScopeConfig.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ class MutableScopeConfig implements MutableScopeConfigInterface
2323
private $testAppConfig;
2424

2525
/**
26-
* @param string $path
27-
* @param string $scopeType
28-
* @param null $scopeCode
29-
* @return bool
26+
* @inheritdoc
3027
*/
3128
public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null)
3229
{

lib/internal/Magento/Framework/App/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(
5050
*
5151
* @param string $path
5252
* @param string $scope
53-
* @param null|string $scopeCode
53+
* @param null|int|string $scopeCode
5454
* @return mixed
5555
*/
5656
public function getValue(
@@ -85,7 +85,7 @@ public function getValue(
8585
*
8686
* @param string $path
8787
* @param string $scope
88-
* @param null|string $scopeCode
88+
* @param null|int|string $scopeCode
8989
* @return bool
9090
*/
9191
public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null)
@@ -95,6 +95,7 @@ public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAU
9595

9696
/**
9797
* Invalidate cache by type
98+
*
9899
* Clean scopeCodeResolver
99100
*
100101
* @return void

lib/internal/Magento/Framework/App/Config/Initial/Reader.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/**
3-
* Default configuration data reader. Reads configuration data from storage
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\App\Config\Initial;
97

8+
/**
9+
* Default configuration data reader. Reads configuration data from storage
10+
*/
1011
class Reader
1112
{
1213
/**
@@ -51,13 +52,17 @@ class Reader
5152
*/
5253
protected $_schemaFile;
5354

55+
/**
56+
* @var \Magento\Framework\Config\DomFactory
57+
*/
58+
private $domFactory;
59+
5460
/**
5561
* @param \Magento\Framework\Config\FileResolverInterface $fileResolver
5662
* @param \Magento\Framework\Config\ConverterInterface $converter
5763
* @param SchemaLocator $schemaLocator
5864
* @param \Magento\Framework\Config\DomFactory $domFactory
5965
* @param string $fileName
60-
* @param string $domDocumentClass
6166
*/
6267
public function __construct(
6368
\Magento\Framework\Config\FileResolverInterface $fileResolver,
@@ -103,6 +108,7 @@ public function read()
103108
} else {
104109
$domDocument->merge($file);
105110
}
111+
// phpcs:ignore Magento2.Exceptions.ThrowCatch.ThrowCatch
106112
} catch (\Magento\Framework\Config\Dom\ValidationException $e) {
107113
throw new \Magento\Framework\Exception\LocalizedException(
108114
new \Magento\Framework\Phrase(

lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ScopeConfigInterface
2323
*
2424
* @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
2525
* @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
26-
* @param null|string $scopeCode
26+
* @param null|int|string $scopeCode
2727
* @return mixed
2828
*/
2929
public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
@@ -33,7 +33,7 @@ public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DE
3333
*
3434
* @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
3535
* @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
36-
* @param null|string $scopeCode
36+
* @param null|int|string $scopeCode
3737
* @return bool
3838
*/
3939
public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);

lib/internal/Magento/Framework/App/Test/Unit/Console/CommandListTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
use Magento\Framework\Console\CommandList;
1010
use Symfony\Component\Console\Command\Command;
1111

12+
/**
13+
* Test for
14+
*
15+
* @see Magento\Framework\Console\CommandList
16+
*/
1217
class CommandListTest extends \PHPUnit\Framework\TestCase
1318
{
1419
/**
@@ -17,7 +22,7 @@ class CommandListTest extends \PHPUnit\Framework\TestCase
1722
private $commandList;
1823

1924
/**
20-
* @var Symfony\Component\Console\Command\Command
25+
* @var Command
2126
*/
2227
private $testCommand;
2328

lib/internal/Magento/Framework/App/Utility/Files.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Framework\Component\ComponentRegistrar;
1010
use Magento\Framework\Component\DirSearch;
1111
use Magento\Framework\Serialize\Serializer\Json;
12+
use Magento\Framework\View\Design\Theme\ThemePackage;
1213
use Magento\Framework\View\Design\Theme\ThemePackageList;
1314
use Magento\Framework\Filesystem\Glob;
1415

@@ -147,6 +148,7 @@ public static function setInstance(Files $instance = null)
147148
public static function init()
148149
{
149150
if (!self::$_instance) {
151+
// phpcs:ignore Magento2.Exceptions.DirectThrow.FoundDirectThrow
150152
throw new \Exception('Instance is not set yet.');
151153
}
152154
return self::$_instance;
@@ -590,6 +592,8 @@ public function getUiComponentXmlFiles($incomingParams = [], $asDataSet = true)
590592
}
591593

592594
/**
595+
* Collect layout files
596+
*
593597
* @param string $location
594598
* @param array $incomingParams
595599
* @param bool $asDataSet
@@ -611,6 +615,7 @@ protected function getLayoutXmlFiles($location, $incomingParams = [], $asDataSet
611615
$params[$key] = $incomingParams[$key];
612616
}
613617
}
618+
//phpcs:ignore Magento2.Security.InsecureFunction
614619
$cacheKey = md5($location . '|' . implode('|', $params));
615620

616621
if (!isset(self::$_cache[__METHOD__][$cacheKey])) {
@@ -712,6 +717,8 @@ private function collectThemeLayoutFiles(array $params, $location)
712717
}
713718

714719
/**
720+
* Parse theme layout files
721+
*
715722
* @param array $themeFiles
716723
* @param string $currentThemePath
717724
* @param ThemePackage $theme
@@ -762,6 +769,7 @@ public function getPageTypeFiles($incomingParams = [], $asDataSet = true)
762769
$params[$key] = $incomingParams[$key];
763770
}
764771
}
772+
//phpcs:ignore Magento2.Security.InsecureFunction
765773
$cacheKey = md5(implode('|', $params));
766774

767775
if (!isset(self::$_cache[__METHOD__][$cacheKey])) {
@@ -840,6 +848,8 @@ public function getJsFiles($area = '*', $themePath = '*/*', $namespace = '*', $m
840848
}
841849

842850
/**
851+
* Returns list of all theme paths
852+
*
843853
* @param string $area
844854
* @param string $module
845855
* @param string $subFolder

lib/internal/Magento/Framework/Cache/Frontend/Decorator/Logger.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(FrontendInterface $frontend, LoggerHandler $logger)
3030
}
3131

3232
/**
33-
* {@inheritdoc}
33+
* @inheritdoc
3434
*/
3535
public function remove($identifier)
3636
{
@@ -40,16 +40,18 @@ public function remove($identifier)
4040
}
4141

4242
/**
43-
* {@inheritdoc}
43+
* @inheritdoc
4444
*/
4545
public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = [])
4646
{
47-
$result = parent::clean($mode, $tags, $mode);
47+
$result = parent::clean($mode, $tags);
4848
$this->log(compact('tags', 'mode'));
4949
return $result;
5050
}
5151

5252
/**
53+
* Log cache invalidation
54+
*
5355
* @param mixed $args
5456
* @return void
5557
*/

lib/internal/Magento/Framework/Config/Test/Unit/Dom/ArrayNodeConfigTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
*/
66
namespace Magento\Framework\Config\Test\Unit\Dom;
77

8-
use \Magento\Framework\Config\Dom\ArrayNodeConfig;
8+
use Magento\Framework\Config\Dom\ArrayNodeConfig;
9+
use Magento\Framework\Config\Dom\NodePathMatcher;
910

11+
/**
12+
* Test for
13+
*
14+
* @see ArrayNodeConfig
15+
*/
1016
class ArrayNodeConfigTest extends \PHPUnit\Framework\TestCase
1117
{
1218
/**
@@ -21,7 +27,7 @@ class ArrayNodeConfigTest extends \PHPUnit\Framework\TestCase
2127

2228
protected function setUp()
2329
{
24-
$this->nodePathMatcher = $this->createMock(\Magento\Framework\Config\Dom\NodePathMatcher::class);
30+
$this->nodePathMatcher = $this->createMock(NodePathMatcher::class);
2531
$this->object = new ArrayNodeConfig(
2632
$this->nodePathMatcher,
2733
['/root/assoc/one' => 'name', '/root/assoc/two' => 'id', '/root/assoc/three' => 'key'],

lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodeMergingConfigTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
*/
66
namespace Magento\Framework\Config\Test\Unit\Dom;
77

8-
use \Magento\Framework\Config\Dom\NodeMergingConfig;
8+
use Magento\Framework\Config\Dom\NodeMergingConfig;
9+
use Magento\Framework\Config\Dom\NodePathMatcher;
910

11+
/**
12+
* Test for
13+
*
14+
* @see NodeMergingConfig
15+
*/
1016
class NodeMergingConfigTest extends \PHPUnit\Framework\TestCase
1117
{
1218
/**
@@ -21,7 +27,7 @@ class NodeMergingConfigTest extends \PHPUnit\Framework\TestCase
2127

2228
protected function setUp()
2329
{
24-
$this->nodePathMatcher = $this->createMock(\Magento\Framework\Config\Dom\NodePathMatcher::class);
30+
$this->nodePathMatcher = $this->createMock(NodePathMatcher::class);
2531
$this->object = new NodeMergingConfig(
2632
$this->nodePathMatcher,
2733
['/root/one' => 'name', '/root/two' => 'id', '/root/three' => 'key']

lib/internal/Magento/Framework/Config/Test/Unit/Reader/FilesystemTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
*/
66
namespace Magento\Framework\Config\Test\Unit\Reader;
77

8-
use \Magento\Framework\Config\Reader\Filesystem;
8+
use Magento\Framework\Config\Reader\Filesystem;
99

10+
/**
11+
* Test for
12+
*
13+
* @see Filesystem
14+
*/
1015
class FilesystemTest extends \PHPUnit\Framework\TestCase
1116
{
1217
/**
@@ -64,7 +69,7 @@ public function testRead()
6469
);
6570
$this->_fileResolverMock->expects($this->once())->method('get')->will($this->returnValue([$this->_file]));
6671

67-
$dom = new \DomDocument();
72+
$dom = new \DOMDocument();
6873
$dom->loadXML($this->_file);
6974
$this->_converterMock->expects($this->once())->method('convert')->with($dom);
7075
$model->read('scope');

0 commit comments

Comments
 (0)