Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit e2c0d0f

Browse files
author
Magento CICD
authored
merge magento/2.3-develop into magento/2.3.0-release
2 parents 34cc53c + b9b7c9c commit e2c0d0f

File tree

98 files changed

+2103
-473
lines changed

Some content is hidden

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

98 files changed

+2103
-473
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,8 @@ Magento is thankful for any contribution that can improve our code base, documen
4141
</a>
4242

4343
<h3>Labels applied by the Magento team</h3>
44-
45-
| Label | Description |
46-
| ------------- |-------------|
47-
| ![DOC](http://devdocs.magento.com/common/images/github_DOC.png) | Affects Documentation domain. |
48-
| ![PROD](http://devdocs.magento.com/common/images/github_PROD.png) | Affects the Product team (mostly feature requests or business logic change). |
49-
| ![TECH](http://devdocs.magento.com/common/images/github_TECH.png) | Affects Architect Group (mostly to make decisions around technology changes). |
50-
| ![accept](http://devdocs.magento.com/common/images/github_accept.png) | The pull request has been accepted and will be merged into mainline code. |
51-
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
52-
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
53-
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
54-
| ![in progress](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
55-
| ![needs update](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
56-
57-
To learn more about issue gate labels click [here](https://github.com/magento/magento2/wiki/Magento-Issue-Gates)
44+
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
45+
Please review the <a href="https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
5846

5947
<h2>Reporting security issues</h2>
6048

app/code/Magento/Backend/Block/Widget/Button/ButtonList.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\Backend\Block\Widget\Button;
88

99
/**
10+
* Button list widget
11+
*
1012
* @api
1113
* @since 100.0.2
1214
*/
@@ -127,12 +129,6 @@ public function getItems()
127129
*/
128130
public function sortButtons(Item $itemA, Item $itemB)
129131
{
130-
$sortOrderA = (int) $itemA->getSortOrder();
131-
$sortOrderB = (int) $itemB->getSortOrder();
132-
133-
if ($sortOrderA == $sortOrderB) {
134-
return 0;
135-
}
136-
return ($sortOrderA < $sortOrderB) ? -1 : 1;
132+
return (int)$itemA->getSortOrder() <=> (int)$itemB->getSortOrder();
137133
}
138134
}

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
namespace Magento\Bundle\Model\Product;
88

9-
use Magento\Framework\App\ObjectManager;
9+
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
10+
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
1011
use Magento\Catalog\Api\ProductRepositoryInterface;
12+
use Magento\Framework\App\ObjectManager;
13+
use Magento\Framework\EntityManager\MetadataPool;
1114
use Magento\Framework\Pricing\PriceCurrencyInterface;
1215
use Magento\Framework\Serialize\Serializer\Json;
13-
use Magento\Framework\EntityManager\MetadataPool;
14-
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
15-
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
1616

1717
/**
1818
* Bundle Type Model
@@ -537,7 +537,7 @@ public function updateQtyOption($options, \Magento\Framework\DataObject $option,
537537
foreach ($options as $quoteItemOption) {
538538
if ($quoteItemOption->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
539539
if ($optionUpdateFlag) {
540-
$quoteItemOption->setValue(intval($quoteItemOption->getValue()));
540+
$quoteItemOption->setValue((int) $quoteItemOption->getValue());
541541
} else {
542542
$quoteItemOption->setValue($value);
543543
}
@@ -625,6 +625,7 @@ public function isSalable($product)
625625

626626
/**
627627
* Prepare product and its configuration to be added to some products list.
628+
*
628629
* Perform standard preparation process and then prepare of bundle selections options.
629630
*
630631
* @param \Magento\Framework\DataObject $buyRequest
@@ -790,6 +791,8 @@ protected function _prepareProduct(\Magento\Framework\DataObject $buyRequest, $p
790791
}
791792

792793
/**
794+
* Cast array values to int
795+
*
793796
* @param array $array
794797
* @return int[]|int[][]
795798
*/
@@ -809,6 +812,8 @@ private function recursiveIntval(array $array)
809812
}
810813

811814
/**
815+
* Convert multi dimensional array to flat
816+
*
812817
* @param array $array
813818
* @return int[]
814819
*/
@@ -920,8 +925,7 @@ public function getOptionsByIds($optionIds, $product)
920925
}
921926

922927
/**
923-
* Prepare additional options/information for order item which will be
924-
* created from this product
928+
* Prepare additional options/information for order item which will be created from this product
925929
*
926930
* @param \Magento\Catalog\Model\Product $product
927931
* @return array
@@ -987,6 +991,7 @@ public function getOrderOptions($product)
987991

988992
/**
989993
* Sort selections method for usort function
994+
*
990995
* Sort selections by option position, selection position and selection id
991996
*
992997
* @param \Magento\Catalog\Model\Product $firstItem
@@ -1009,10 +1014,8 @@ public function shakeSelections($firstItem, $secondItem)
10091014
$secondItem->getPosition(),
10101015
$secondItem->getSelectionId(),
10111016
];
1012-
if ($aPosition == $bPosition) {
1013-
return 0;
1014-
}
1015-
return $aPosition < $bPosition ? -1 : 1;
1017+
1018+
return $aPosition <=> $bPosition;
10161019
}
10171020

10181021
/**
@@ -1050,6 +1053,7 @@ public function getForceChildItemQtyChanges($product)
10501053

10511054
/**
10521055
* Retrieve additional searchable data from type instance
1056+
*
10531057
* Using based on product id and store_id data
10541058
*
10551059
* @param \Magento\Catalog\Model\Product $product
@@ -1118,6 +1122,7 @@ public function checkProductBuyState($product)
11181122

11191123
/**
11201124
* Retrieve products divided into groups required to purchase
1125+
*
11211126
* At least one product in each group has to be purchased
11221127
*
11231128
* @param \Magento\Catalog\Model\Product $product
@@ -1214,6 +1219,8 @@ public function getIdentities(\Magento\Catalog\Model\Product $product)
12141219
}
12151220

12161221
/**
1222+
* Returns selection qty
1223+
*
12171224
* @param \Magento\Framework\DataObject $selection
12181225
* @param int[] $qtys
12191226
* @param int $selectionOptionId
@@ -1232,6 +1239,8 @@ protected function getQty($selection, $qtys, $selectionOptionId)
12321239
}
12331240

12341241
/**
1242+
* Returns qty
1243+
*
12351244
* @param \Magento\Catalog\Model\Product $product
12361245
* @param \Magento\Framework\DataObject $selection
12371246
* @return float|int
@@ -1249,6 +1258,8 @@ protected function getBeforeQty($product, $selection)
12491258
}
12501259

12511260
/**
1261+
* Validate required options
1262+
*
12521263
* @param \Magento\Catalog\Model\Product $product
12531264
* @param bool $isStrictProcessMode
12541265
* @param \Magento\Bundle\Model\ResourceModel\Option\Collection $optionsCollection
@@ -1270,6 +1281,8 @@ protected function checkIsAllRequiredOptions($product, $isStrictProcessMode, $op
12701281
}
12711282

12721283
/**
1284+
* Check if selection is salable
1285+
*
12731286
* @param \Magento\Bundle\Model\ResourceModel\Selection\Collection $selections
12741287
* @param bool $skipSaleableCheck
12751288
* @param \Magento\Bundle\Model\ResourceModel\Option\Collection $optionsCollection
@@ -1300,6 +1313,8 @@ protected function checkSelectionsIsSale($selections, $skipSaleableCheck, $optio
13001313
}
13011314

13021315
/**
1316+
* Validate result
1317+
*
13031318
* @param array $_result
13041319
* @return void
13051320
* @throws \Magento\Framework\Exception\LocalizedException
@@ -1318,6 +1333,8 @@ protected function checkIsResult($_result)
13181333
}
13191334

13201335
/**
1336+
* Merge selections with options
1337+
*
13211338
* @param \Magento\Catalog\Model\Product\Option[] $options
13221339
* @param \Magento\Framework\DataObject[] $selections
13231340
* @return \Magento\Framework\DataObject[]

app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function getCacheKeyInfo()
139139
[
140140
$this->getDisplayType(),
141141
$this->getProductsPerPage(),
142-
intval($this->getRequest()->getParam($this->getData('page_var_name'), 1)),
142+
(int) $this->getRequest()->getParam($this->getData('page_var_name'), 1),
143143
$this->serializer->serialize($this->getRequest()->getParams())
144144
]
145145
);

0 commit comments

Comments
 (0)