Skip to content

Commit 6c3686a

Browse files
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-98087
2 parents f78a3e1 + 10f900e commit 6c3686a

File tree

140 files changed

+3264
-6393
lines changed

Some content is hidden

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

140 files changed

+3264
-6393
lines changed

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @api
2020
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2223
* @since 100.0.2
2324
*/
2425
class Context extends \Magento\Framework\View\Element\Template\Context
@@ -174,7 +175,7 @@ public function getAuthorization()
174175
}
175176

176177
/**
177-
* Get Backend Session
178+
* Get backend session instance.
178179
*
179180
* @return \Magento\Backend\Model\Session
180181
*/
@@ -184,7 +185,7 @@ public function getBackendSession()
184185
}
185186

186187
/**
187-
* Get Math Random
188+
* Get math random instance.
188189
*
189190
* @return \Magento\Framework\Math\Random
190191
*/
@@ -194,7 +195,7 @@ public function getMathRandom()
194195
}
195196

196197
/**
197-
* Get Form Key
198+
* Get form key instance.
198199
*
199200
* @return \Magento\Framework\Data\Form\FormKey
200201
*/
@@ -204,7 +205,7 @@ public function getFormKey()
204205
}
205206

206207
/**
207-
* Get Class Name Builder
208+
* Get name builder instance.
208209
*
209210
* @return \Magento\Framework\Code\NameBuilder
210211
*/

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
2828
protected $_column;
2929

3030
/**
31+
* Set column for renderer.
32+
*
3133
* @param Column $column
3234
* @return $this
3335
*/
@@ -38,6 +40,8 @@ public function setColumn($column)
3840
}
3941

4042
/**
43+
* Returns row associated with the renderer.
44+
*
4145
* @return Column
4246
*/
4347
public function getColumn()
@@ -48,7 +52,7 @@ public function getColumn()
4852
/**
4953
* Renders grid column
5054
*
51-
* @param Object $row
55+
* @param DataObject $row
5256
* @return string
5357
*/
5458
public function render(DataObject $row)
@@ -66,7 +70,7 @@ public function render(DataObject $row)
6670
/**
6771
* Render column for export
6872
*
69-
* @param Object $row
73+
* @param DataObject $row
7074
* @return string
7175
*/
7276
public function renderExport(DataObject $row)
@@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
7579
}
7680

7781
/**
78-
* @param Object $row
82+
* Returns value of the row.
83+
*
84+
* @param DataObject $row
7985
* @return mixed
8086
*/
8187
protected function _getValue(DataObject $row)
@@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
9298
}
9399

94100
/**
95-
* @param Object $row
101+
* Get pre-rendered input element.
102+
*
103+
* @param DataObject $row
96104
* @return string
97105
*/
98106
public function _getInputValueElement(DataObject $row)
@@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
108116
}
109117

110118
/**
111-
* @param Object $row
119+
* Get input value by row.
120+
*
121+
* @param DataObject $row
112122
* @return mixed
113123
*/
114124
protected function _getInputValue(DataObject $row)
@@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
117127
}
118128

119129
/**
130+
* Renders header of the column,
131+
*
120132
* @return string
121133
*/
122134
public function renderHeader()
@@ -148,6 +160,8 @@ public function renderHeader()
148160
}
149161

150162
/**
163+
* Render HTML properties.
164+
*
151165
* @return string
152166
*/
153167
public function renderProperty()
@@ -172,6 +186,8 @@ public function renderProperty()
172186
}
173187

174188
/**
189+
* Returns HTML for CSS.
190+
*
175191
* @return string
176192
*/
177193
public function renderCss()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class ProductsViewed extends AjaxBlock
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
/**
12+
* Get most viewed products controller.
13+
*/
14+
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
1015
{
1116
/**
1217
* Gets most viewed products list
1318
*
14-
* @return \Magento\Backend\Model\View\Result\Page
19+
* @return \Magento\Framework\Controller\Result\Raw
1520
*/
1621
public function execute()
1722
{

app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __get($name)
4040
}
4141

4242
/**
43-
* Checks for the existance of a property stored in the private $_attributes property
43+
* Checks for the existence of a property stored in the private $_attributes property
4444
*
4545
* @ignore
4646
* @param string $name

app/code/Magento/Captcha/Observer/CheckUserLoginObserver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Captcha\Observer;
78

89
use Magento\Customer\Model\AuthenticationInterface;
@@ -11,7 +12,10 @@
1112
use Magento\Customer\Api\CustomerRepositoryInterface;
1213

1314
/**
15+
* Check captcha on user login page observer.
16+
*
1417
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1519
*/
1620
class CheckUserLoginObserver implements ObserverInterface
1721
{
@@ -140,7 +144,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
140144
$customer = $this->getCustomerRepository()->get($login);
141145
$this->getAuthentication()->processAuthenticationFailure($customer->getId());
142146
} catch (NoSuchEntityException $e) {
143-
//do nothing as customer existance is validated later in authenticate method
147+
//do nothing as customer existence is validated later in authenticate method
144148
}
145149
$this->messageManager->addError(__('Incorrect CAPTCHA'));
146150
$this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);

app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator;
99
use Magento\Framework\App\Config\ScopeConfigInterface;
10+
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1011
use Magento\Store\Model\ScopeInterface;
1112

1213
/**
@@ -83,6 +84,7 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac
8384
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
8485
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
8586
*
87+
* @param ResourceModelPoolInterface|null $resourceModelPool
8688
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8789
*/
8890
public function __construct(
@@ -97,7 +99,8 @@ public function __construct(
9799
\Magento\Framework\Validator\UniversalFactory $universalFactory,
98100
\Magento\Store\Model\StoreManagerInterface $storeManager,
99101
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
100-
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig = null
102+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig = null,
103+
ResourceModelPoolInterface $resourceModelPool = null
101104
) {
102105
parent::__construct(
103106
$entityFactory,
@@ -110,7 +113,8 @@ public function __construct(
110113
$resourceHelper,
111114
$universalFactory,
112115
$storeManager,
113-
$connection
116+
$connection,
117+
$resourceModelPool
114118
);
115119
$this->scopeConfig = $scopeConfig ?:
116120
\Magento\Framework\App\ObjectManager::getInstance()->get(ScopeConfigInterface::class);

app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
*/
66
namespace Magento\Catalog\Model\ResourceModel\Collection;
77

8+
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
9+
810
/**
911
* Catalog EAV collection resource abstract model
12+
*
1013
* Implement using different stores for retrieve attribute values
1114
*
1215
* @api
@@ -43,6 +46,7 @@ class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\AbstractCo
4346
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
4447
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
4548
*
49+
* @param ResourceModelPoolInterface|null $resourceModelPool
4650
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
4751
*/
4852
public function __construct(
@@ -56,7 +60,8 @@ public function __construct(
5660
\Magento\Eav\Model\ResourceModel\Helper $resourceHelper,
5761
\Magento\Framework\Validator\UniversalFactory $universalFactory,
5862
\Magento\Store\Model\StoreManagerInterface $storeManager,
59-
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null
63+
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
64+
ResourceModelPoolInterface $resourceModelPool = null
6065
) {
6166
$this->_storeManager = $storeManager;
6267
parent::__construct(
@@ -69,7 +74,8 @@ public function __construct(
6974
$eavEntityFactory,
7075
$resourceHelper,
7176
$universalFactory,
72-
$connection
77+
$connection,
78+
$resourceModelPool
7379
);
7480
}
7581

@@ -205,10 +211,7 @@ protected function _getLoadAttributesSelect($table, $attributeIds = [])
205211
}
206212

207213
/**
208-
* @param \Magento\Framework\DB\Select $select
209-
* @param string $table
210-
* @param string $type
211-
* @return \Magento\Framework\DB\Select
214+
* @inheritdoc
212215
*/
213216
protected function _addLoadAttributesSelectValues($select, $table, $type)
214217
{

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Magento\Store\Model\Store;
2222
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
2323
use Magento\Framework\Indexer\DimensionFactory;
24+
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
2425

2526
/**
2627
* Product collection
@@ -297,6 +298,7 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac
297298

298299
/**
299300
* Collection constructor
301+
*
300302
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
301303
* @param \Psr\Log\LoggerInterface $logger
302304
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
@@ -322,6 +324,8 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac
322324
* @param TableMaintainer|null $tableMaintainer
323325
* @param PriceTableResolver|null $priceTableResolver
324326
* @param DimensionFactory|null $dimensionFactory
327+
* @param ResourceModelPoolInterface|null $resourceModelPool
328+
*
325329
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
326330
*/
327331
public function __construct(
@@ -349,7 +353,8 @@ public function __construct(
349353
MetadataPool $metadataPool = null,
350354
TableMaintainer $tableMaintainer = null,
351355
PriceTableResolver $priceTableResolver = null,
352-
DimensionFactory $dimensionFactory = null
356+
DimensionFactory $dimensionFactory = null,
357+
ResourceModelPoolInterface $resourceModelPool = null
353358
) {
354359
$this->moduleManager = $moduleManager;
355360
$this->_catalogProductFlatState = $catalogProductFlatState;
@@ -377,7 +382,8 @@ public function __construct(
377382
$resourceHelper,
378383
$universalFactory,
379384
$storeManager,
380-
$connection
385+
$connection,
386+
$resourceModelPool
381387
);
382388
$this->tableMaintainer = $tableMaintainer ?: ObjectManager::getInstance()->get(TableMaintainer::class);
383389
$this->priceTableResolver = $priceTableResolver ?: ObjectManager::getInstance()->get(PriceTableResolver::class);
@@ -1437,7 +1443,7 @@ protected function _addUrlRewrite()
14371443
'u.url_rewrite_id=cu.url_rewrite_id'
14381444
)->where('cu.url_rewrite_id IS NULL');
14391445
}
1440-
1446+
14411447
// more priority is data with category id
14421448
$urlRewrites = [];
14431449

0 commit comments

Comments
 (0)