Skip to content

Commit f6c4cbd

Browse files
committed
Use one format in all places for array_merge
Fix failing static tests
1 parent a2b9380 commit f6c4cbd

File tree

8 files changed

+17
-30
lines changed

8 files changed

+17
-30
lines changed

app/code/Magento/Catalog/Model/Product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ public function priceReindexCallback()
10301030
*/
10311031
public function eavReindexCallback()
10321032
{
1033-
if ($this->isObjectNew() || $this->isDataChanged($this)) {
1033+
if ($this->isObjectNew() || $this->isDataChanged()) {
10341034
$this->_productEavIndexerProcessor->reindexRow($this->getEntityId());
10351035
}
10361036
}
@@ -1176,7 +1176,7 @@ public function getTierPrice($qty = null)
11761176
/**
11771177
* Get formatted by currency product price
11781178
*
1179-
* @return array|double
1179+
* @return array|double
11801180
* @since 102.0.6
11811181
*/
11821182
public function getFormattedPrice()

app/code/Magento/Catalog/Model/Product/Price/TierPriceStorage.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
use Magento\Catalog\Model\Product\Price\Validation\TierPriceValidator;
1313
use Magento\Catalog\Model\ProductIdLocatorInterface;
1414

15-
/**
16-
* Tier price storage.
17-
*/
1815
class TierPriceStorage implements TierPriceStorageInterface
1916
{
2017
/**

app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
use RuntimeException;
3838

3939
/**
40-
* Class AfterImportDataObserver
41-
*
4240
* @SuppressWarnings(PHPMD.TooManyFields)
4341
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
4442
*/

app/code/Magento/Deploy/Package/Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ private function collectParentPaths(
535535
$area,
536536
$theme,
537537
$locale,
538-
array & $result = [],
538+
array &$result = [],
539539
ThemeInterface $themeModel = null
540540
) {
541541
if (($package->getArea() != $area) || ($package->getTheme() != $theme) || ($package->getLocale() != $locale)) {

app/code/Magento/Eav/Model/ResourceModel/Helper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Helper extends \Magento\Framework\DB\Helper
1919
* @param \Magento\Framework\App\ResourceConnection $resource
2020
* @param string $modulePrefix
2121
* @codeCoverageIgnore
22+
* phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod
2223
*/
2324
public function __construct(\Magento\Framework\App\ResourceConnection $resource, $modulePrefix = 'Magento_Eav')
2425
{

app/code/Magento/Ups/Model/Carrier.php

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ protected function _getXmlTracking($trackings)
11351135
</TrackRequest>
11361136
XMLAuth;
11371137

1138-
$trackingResponses[] = $this->asyncHttpClient->request(
1138+
$trackingResponses[$tracking] = $this->asyncHttpClient->request(
11391139
new Request(
11401140
$url,
11411141
Request::METHOD_POST,
@@ -1144,13 +1144,9 @@ protected function _getXmlTracking($trackings)
11441144
)
11451145
);
11461146
}
1147-
foreach ($trackingResponses as $response) {
1147+
foreach ($trackingResponses as $tracking => $response) {
11481148
$httpResponse = $response->get();
1149-
if ($httpResponse->getStatusCode() >= 400) {
1150-
$xmlResponse = '';
1151-
} else {
1152-
$xmlResponse = $httpResponse->getBody();
1153-
}
1149+
$xmlResponse = $httpResponse->getStatusCode() >= 400 ? '' : $httpResponse->getBody();
11541150

11551151
$this->_parseXmlTrackingResponse($tracking, $xmlResponse);
11561152
}
@@ -1529,24 +1525,18 @@ protected function _formShipmentRequest(DataObject $request)
15291525
}
15301526

15311527
if ($deliveryConfirmation && $deliveryConfirmationLevel === self::DELIVERY_CONFIRMATION_PACKAGE) {
1532-
$serviceOptionsNode = $packagePart[$packageId]->addChild('PackageServiceOptions');
1533-
$serviceOptionsNode->addChild(
1534-
'DeliveryConfirmation'
1535-
)->addChild(
1536-
'DCISType',
1537-
$deliveryConfirmation
1538-
);
1528+
$serviceOptionsNode = $packagePart[$packageId]->addChild('PackageServiceOptions');
1529+
$serviceOptionsNode
1530+
->addChild('DeliveryConfirmation')
1531+
->addChild('DCISType', $deliveryConfirmation);
15391532
}
15401533
}
15411534

15421535
if (isset($deliveryConfirmation) && $deliveryConfirmationLevel === self::DELIVERY_CONFIRMATION_SHIPMENT) {
15431536
$serviceOptionsNode = $shipmentPart->addChild('ShipmentServiceOptions');
1544-
$serviceOptionsNode->addChild(
1545-
'DeliveryConfirmation'
1546-
)->addChild(
1547-
'DCISType',
1548-
$deliveryConfirmation
1549-
);
1537+
$serviceOptionsNode
1538+
->addChild('DeliveryConfirmation')
1539+
->addChild('DCISType', $deliveryConfirmation);
15501540
}
15511541

15521542
$shipmentPart->addChild('PaymentInformation')
@@ -1628,6 +1618,7 @@ protected function _sendShipmentAcceptRequest(Element $shipmentConfirmResponse)
16281618
try {
16291619
$response = $this->_xmlElFactory->create(['data' => $xmlResponse]);
16301620
} catch (Throwable $e) {
1621+
$response = $this->_xmlElFactory->create(['data' => '']);
16311622
$debugData['result'] = ['error' => $e->getMessage(), 'code' => $e->getCode()];
16321623
}
16331624

@@ -1801,6 +1792,7 @@ protected function _doShipmentRequest(DataObject $request)
18011792
$this->setXMLAccessRequest();
18021793
$xmlRequest = $this->_xmlAccessRequest . $rawXmlRequest;
18031794
$xmlResponse = $this->_getCachedQuotes($xmlRequest);
1795+
$debugData = [];
18041796

18051797
if ($xmlResponse === null) {
18061798
$debugData['request'] = $this->filterDebugData($this->_xmlAccessRequest) . $rawXmlRequest;

app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ class Generator extends AbstractSchemaGenerator
3333
*/
3434
const ERROR_SCHEMA = '#/definitions/error-response';
3535

36-
/** Unauthorized description */
3736
const UNAUTHORIZED_DESCRIPTION = '401 Unauthorized';
3837

39-
/** Array signifier */
4038
const ARRAY_SIGNIFIER = '[0]';
4139

4240
/**

setup/src/Magento/Setup/Console/Style/MagentoStyle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ private function createBlock(
565565
) {
566566
$indentLength = 0;
567567
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
568+
$lineIndentation = '';
568569
if (null !== $type) {
569570
$type = sprintf('[%s] ', $type);
570571
$indentLength = strlen($type);

0 commit comments

Comments
 (0)