Skip to content

Commit f9297ec

Browse files
committed
Merge remote-tracking branch 'epam/2.3-develop' into EPAM-PR-85
2 parents 701ebc6 + abbfa03 commit f9297ec

File tree

82 files changed

+3672
-717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3672
-717
lines changed

app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/ConfigTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public function testGetSolutionIdSandbox($environment, $expectedSolution)
8181
$this->assertEquals($expectedSolution, $this->model->getSolutionId(123));
8282
}
8383

84+
/**
85+
* @return array
86+
*/
8487
public function configMapProvider()
8588
{
8689
return [
@@ -97,6 +100,10 @@ public function configMapProvider()
97100
['getTransactionInfoSyncKeys', 'transactionSyncKeys', 'a,b,c', ['a', 'b', 'c']],
98101
];
99102
}
103+
104+
/**
105+
* @return array
106+
*/
100107
public function environmentUrlProvider()
101108
{
102109
return [
@@ -105,6 +112,9 @@ public function environmentUrlProvider()
105112
];
106113
}
107114

115+
/**
116+
* @return array
117+
*/
108118
public function environmentSolutionProvider()
109119
{
110120
return [

app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Request/AddressDataBuilderTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,22 @@ public function testBuildWithBothAddresses()
108108
$this->assertEquals('abc', $result['transactionRequest']['customerIP']);
109109
}
110110

111+
/**
112+
* @param $responseData
113+
* @param $addressPrefix
114+
*/
111115
private function validateAddressData($responseData, $addressPrefix)
112116
{
113117
foreach ($this->mockAddressData as $fieldValue => $field) {
114118
$this->assertEquals($addressPrefix . $field['sampleData'], $responseData[$fieldValue]);
115119
}
116120
}
117121

122+
/**
123+
* @param $prefix
124+
*
125+
* @return \PHPUnit\Framework\MockObject\MockObject
126+
*/
118127
private function createAddressMock($prefix)
119128
{
120129
$addressAdapterMock = $this->createMock(AddressAdapterInterface::class);

app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Response/PaymentReviewStatusHandlerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ public function testDoesNothingWhenPending(string $status)
112112
$this->handler->handle($subject, $response);
113113
}
114114

115+
/**
116+
* @return array
117+
*/
115118
public function pendingTransactionStatusesProvider()
116119
{
117120
return [
@@ -120,6 +123,9 @@ public function pendingTransactionStatusesProvider()
120123
];
121124
}
122125

126+
/**
127+
* @return array
128+
*/
123129
public function declinedTransactionStatusesProvider()
124130
{
125131
return [

app/code/Magento/Catalog/Helper/Output.php

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@
99

1010
use Magento\Catalog\Model\Category as ModelCategory;
1111
use Magento\Catalog\Model\Product as ModelProduct;
12+
use Magento\Eav\Model\Config;
13+
use Magento\Framework\App\Helper\AbstractHelper;
14+
use Magento\Framework\App\Helper\Context;
15+
use Magento\Framework\Escaper;
16+
use Magento\Framework\Exception\LocalizedException;
1217
use Magento\Framework\Filter\Template;
18+
use function is_object;
19+
use function method_exists;
20+
use function preg_match;
21+
use function strtolower;
1322

14-
class Output extends \Magento\Framework\App\Helper\AbstractHelper
23+
/**
24+
* Html output
25+
*/
26+
class Output extends AbstractHelper
1527
{
1628
/**
1729
* Array of existing handlers
@@ -37,12 +49,12 @@ class Output extends \Magento\Framework\App\Helper\AbstractHelper
3749
/**
3850
* Eav config
3951
*
40-
* @var \Magento\Eav\Model\Config
52+
* @var Config
4153
*/
4254
protected $_eavConfig;
4355

4456
/**
45-
* @var \Magento\Framework\Escaper
57+
* @var Escaper
4658
*/
4759
protected $_escaper;
4860

@@ -53,27 +65,32 @@ class Output extends \Magento\Framework\App\Helper\AbstractHelper
5365

5466
/**
5567
* Output constructor.
56-
* @param \Magento\Framework\App\Helper\Context $context
57-
* @param \Magento\Eav\Model\Config $eavConfig
68+
* @param Context $context
69+
* @param Config $eavConfig
5870
* @param Data $catalogData
59-
* @param \Magento\Framework\Escaper $escaper
71+
* @param Escaper $escaper
6072
* @param array $directivePatterns
73+
* @param array $handlers
6174
*/
6275
public function __construct(
63-
\Magento\Framework\App\Helper\Context $context,
64-
\Magento\Eav\Model\Config $eavConfig,
76+
Context $context,
77+
Config $eavConfig,
6578
Data $catalogData,
66-
\Magento\Framework\Escaper $escaper,
67-
$directivePatterns = []
79+
Escaper $escaper,
80+
$directivePatterns = [],
81+
array $handlers = []
6882
) {
6983
$this->_eavConfig = $eavConfig;
7084
$this->_catalogData = $catalogData;
7185
$this->_escaper = $escaper;
7286
$this->directivePatterns = $directivePatterns;
87+
$this->_handlers = $handlers;
7388
parent::__construct($context);
7489
}
7590

7691
/**
92+
* Return template processor
93+
*
7794
* @return Template
7895
*/
7996
protected function _getTemplateProcessor()
@@ -115,8 +132,7 @@ public function addHandler($method, $handler)
115132
*/
116133
public function getHandlers($method)
117134
{
118-
$method = strtolower($method);
119-
return $this->_handlers[$method] ?? [];
135+
return $this->_handlers[strtolower($method)] ?? [];
120136
}
121137

122138
/**
@@ -145,21 +161,21 @@ public function process($method, $result, $params)
145161
* @param string $attributeName
146162
* @return string
147163
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
148-
* @throws \Magento\Framework\Exception\LocalizedException
164+
* @throws LocalizedException
149165
*/
150166
public function productAttribute($product, $attributeHtml, $attributeName)
151167
{
152168
$attribute = $this->_eavConfig->getAttribute(ModelProduct::ENTITY, $attributeName);
153169
if ($attribute &&
154170
$attribute->getId() &&
155-
$attribute->getFrontendInput() != 'media_image' &&
171+
$attribute->getFrontendInput() !== 'media_image' &&
156172
(!$attribute->getIsHtmlAllowedOnFront() &&
157173
!$attribute->getIsWysiwygEnabled())
158174
) {
159-
if ($attribute->getFrontendInput() != 'price') {
175+
if ($attribute->getFrontendInput() !== 'price') {
160176
$attributeHtml = $this->_escaper->escapeHtml($attributeHtml);
161177
}
162-
if ($attribute->getFrontendInput() == 'textarea') {
178+
if ($attribute->getFrontendInput() === 'textarea') {
163179
$attributeHtml = nl2br($attributeHtml);
164180
}
165181
}
@@ -187,14 +203,14 @@ public function productAttribute($product, $attributeHtml, $attributeName)
187203
* @param string $attributeHtml
188204
* @param string $attributeName
189205
* @return string
190-
* @throws \Magento\Framework\Exception\LocalizedException
206+
* @throws LocalizedException
191207
*/
192208
public function categoryAttribute($category, $attributeHtml, $attributeName)
193209
{
194210
$attribute = $this->_eavConfig->getAttribute(ModelCategory::ENTITY, $attributeName);
195211

196212
if ($attribute &&
197-
$attribute->getFrontendInput() != 'image' &&
213+
$attribute->getFrontendInput() !== 'image' &&
198214
(!$attribute->getIsHtmlAllowedOnFront() &&
199215
!$attribute->getIsWysiwygEnabled())
200216
) {

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
<waitForPageLoad stepKey="waitForGridLoad"/>
390390
</actionGroup>
391391

392-
<!--Filter and select the the product -->
392+
<!--Filter and select the product -->
393393
<actionGroup name="filterAndSelectProduct">
394394
<annotations>
395395
<description>Goes to the Admin Products grid. Filters the Product grid by the provided Product SKU.</description>

app/code/Magento/Catalog/Test/Unit/Model/Category/FileInfoTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ public function testIsExist($fileName, $fileMediaPath)
191191
$this->assertTrue($this->model->isExist($fileName));
192192
}
193193

194+
/**
195+
* @return array
196+
*/
194197
public function isExistProvider()
195198
{
196199
return [
@@ -213,6 +216,9 @@ public function testIsBeginsWithMediaDirectoryPath($fileName, $expected)
213216
$this->assertEquals($expected, $this->model->isBeginsWithMediaDirectoryPath($fileName));
214217
}
215218

219+
/**
220+
* @return array
221+
*/
216222
public function isBeginsWithMediaDirectoryPathProvider()
217223
{
218224
return [

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ public function testGetStoreSingleSiteModelIds(
486486
$this->assertEquals($websiteIDs, $this->model->getStoreIds());
487487
}
488488

489+
/**
490+
* @return array
491+
*/
489492
public function getSingleStoreIds()
490493
{
491494
return [

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
<!-- Check product in checkout cart items -->
223223
<actionGroup name="CheckProductInCheckoutCartItemsActionGroup">
224224
<annotations>
225-
<description>Validates the the provided Product appears in the Storefront Checkout 'Order Summary' section.</description>
225+
<description>Validates the provided Product appears in the Storefront Checkout 'Order Summary' section.</description>
226226
</annotations>
227227
<arguments>
228228
<argument name="productVar"/>

app/code/Magento/Checkout/Test/Unit/Model/Cart/RequestQuantityProcessorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public function testProcess($cartData, $expected)
4848
$this->assertEquals($this->requestProcessor->process($cartData), $expected);
4949
}
5050

51+
/**
52+
* @return array
53+
*/
5154
public function cartDataProvider()
5255
{
5356
return [

app/code/Magento/Config/Test/Mftf/ActionGroup/AdminConfigCreateNewAccountActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="SetGroupForValidVATIdIntraUnionActionGroup">
1212
<annotations>
13-
<description>Goes to the 'Configuration' page for 'Customer Configuration'. Sets the 'Group For Valid VAT ID Intra Union' option. Clicks on the Save button. Validates the the Save message is present.</description>
13+
<description>Goes to the 'Configuration' page for 'Customer Configuration'. Sets the 'Group For Valid VAT ID Intra Union' option. Clicks on the Save button. Validates the Save message is present.</description>
1414
</annotations>
1515
<arguments>
1616
<argument name="value" type="string"/>

0 commit comments

Comments
 (0)