Skip to content

Commit d18aefb

Browse files
committed
MC-5806: Detection of URL dependencies does not work for the Dependency static test
1 parent fe8f197 commit d18aefb

File tree

11 files changed

+257
-85
lines changed

11 files changed

+257
-85
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function __construct(
8585
}
8686

8787
/**
88-
* @return void
88+
* @inheritDoc
8989
*/
9090
protected function _construct()
9191
{
@@ -99,7 +99,10 @@ protected function _construct()
9999
}
100100

101101
/**
102+
* Get store
103+
*
102104
* @return Store
105+
* @throws \Magento\Framework\Exception\NoSuchEntityException
103106
*/
104107
protected function _getStore()
105108
{
@@ -108,7 +111,7 @@ protected function _getStore()
108111
}
109112

110113
/**
111-
* @return $this
114+
* @inheritDoc
112115
*/
113116
protected function _prepareCollection()
114117
{
@@ -136,7 +139,6 @@ protected function _prepareCollection()
136139
);
137140
}
138141
if ($store->getId()) {
139-
//$collection->setStoreId($store->getId());
140142
$collection->addStoreFilter($store);
141143
$collection->joinAttribute(
142144
'name',
@@ -187,8 +189,7 @@ protected function _prepareCollection()
187189
}
188190

189191
/**
190-
* @param \Magento\Backend\Block\Widget\Grid\Column $column
191-
* @return $this
192+
* @inheritDoc
192193
*/
193194
protected function _addColumnFilterToCollection($column)
194195
{
@@ -208,8 +209,9 @@ protected function _addColumnFilterToCollection($column)
208209
}
209210

210211
/**
211-
* @return $this
212+
* @inheritDoc
212213
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
214+
* @throws \Exception
213215
*/
214216
protected function _prepareColumns()
215217
{
@@ -364,16 +366,11 @@ protected function _prepareColumns()
364366
]
365367
);
366368

367-
$block = $this->getLayout()->getBlock('grid.bottom.links');
368-
if ($block) {
369-
$this->setChild('grid.bottom.links', $block);
370-
}
371-
372369
return parent::_prepareColumns();
373370
}
374371

375372
/**
376-
* @return $this
373+
* @inheritDoc
377374
*/
378375
protected function _prepareMassaction()
379376
{
@@ -425,16 +422,15 @@ protected function _prepareMassaction()
425422
}
426423

427424
/**
428-
* @return string
425+
* @inheritDoc
429426
*/
430427
public function getGridUrl()
431428
{
432429
return $this->getUrl('catalog/*/grid', ['_current' => true]);
433430
}
434431

435432
/**
436-
* @param \Magento\Catalog\Model\Product|\Magento\Framework\DataObject $row
437-
* @return string
433+
* @inheritDoc
438434
*/
439435
public function getRowUrl($row)
440436
{

app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grid.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
99
<update handle="formkey"/>
1010
<container name="root" label="Root">
11-
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid"/>
11+
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid">
12+
<block class="Magento\Framework\View\Element\Text\ListText" name="grid.bottom.links"/>
13+
</block>
1214
</container>
1315
</layout>

app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function execute()
3131
$result = new DataObject();
3232
try {
3333
$agreementsValidator = $this->_objectManager->get(
34-
\Magento\CheckoutAgreements\Model\AgreementsValidator::class
34+
\Magento\Checkout\Api\AgreementsValidatorInterface::class
3535
);
3636
if (!$agreementsValidator->isValid(array_keys($this->getRequest()->getPost('agreement', [])))) {
3737
$result->setData('success', false);

app/code/Magento/Review/Block/Adminhtml/Rss.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Class Rss
12+
*
1213
* @package Magento\Catalog\Block\Adminhtml\Rss
1314
*/
1415
class Rss extends \Magento\Backend\Block\AbstractBlock implements DataProviderInterface
@@ -41,7 +42,7 @@ public function __construct(
4142
}
4243

4344
/**
44-
* {@inheritdoc}
45+
* @inheritDoc
4546
*/
4647
public function getRssData()
4748
{
@@ -55,11 +56,14 @@ public function getRssData()
5556
}
5657

5758
$url = $this->getUrl('catalog/product/view', ['id' => $item->getId()]);
58-
$reviewUrl = $this->getUrl('review/product/edit/', [
59-
'id' => $item->getReviewId(),
60-
'_secure' => true,
61-
'_nosecret' => true
62-
]);
59+
$reviewUrl = $this->getUrl(
60+
'review/product/edit/',
61+
[
62+
'id' => $item->getReviewId(),
63+
'_secure' => true,
64+
'_nosecret' => true
65+
]
66+
);
6367

6468
$storeName = $this->storeManager->getStore($item->getStoreId())->getName();
6569
$description = '<p>' . __('Product: <a href="%1" target="_blank">%2</a> <br/>', $url, $item->getName())
@@ -79,31 +83,31 @@ public function getRssData()
7983
}
8084

8185
/**
82-
* {@inheritdoc}
86+
* @inheritDoc
8387
*/
8488
public function getCacheLifetime()
8589
{
8690
return 0;
8791
}
8892

8993
/**
90-
* {@inheritdoc}
94+
* @inheritDoc
9195
*/
9296
public function isAllowed()
9397
{
9498
return true;
9599
}
96100

97101
/**
98-
* {@inheritdoc}
102+
* @inheritDoc
99103
*/
100104
public function getFeeds()
101105
{
102106
return [];
103107
}
104108

105109
/**
106-
* {@inheritdoc}
110+
* @inheritDoc
107111
*/
108112
public function isAuthRequired()
109113
{

app/code/Magento/Sales/Block/Order/History.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(
6767
}
6868

6969
/**
70-
* @return void
70+
* @inheritDoc
7171
*/
7272
protected function _construct()
7373
{
@@ -76,8 +76,9 @@ protected function _construct()
7676
}
7777

7878
/**
79-
* @return CollectionFactoryInterface
79+
* Provide order collection factory
8080
*
81+
* @return CollectionFactoryInterface
8182
* @deprecated 100.1.1
8283
*/
8384
private function getOrderCollectionFactory()
@@ -89,6 +90,8 @@ private function getOrderCollectionFactory()
8990
}
9091

9192
/**
93+
* Get customer orders
94+
*
9295
* @return bool|\Magento\Sales\Model\ResourceModel\Order\Collection
9396
*/
9497
public function getOrders()
@@ -111,7 +114,7 @@ public function getOrders()
111114
}
112115

113116
/**
114-
* @return $this
117+
* @inheritDoc
115118
*/
116119
protected function _prepareLayout()
117120
{
@@ -130,6 +133,8 @@ protected function _prepareLayout()
130133
}
131134

132135
/**
136+
* Get Pager child block output
137+
*
133138
* @return string
134139
*/
135140
public function getPagerHtml()
@@ -138,6 +143,8 @@ public function getPagerHtml()
138143
}
139144

140145
/**
146+
* Get order view URL
147+
*
141148
* @param object $order
142149
* @return string
143150
*/
@@ -147,9 +154,12 @@ public function getViewUrl($order)
147154
}
148155

149156
/**
157+
* Get order track URL
158+
*
150159
* @param object $order
151160
* @return string
152161
* @deprecated Action does not exist
162+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
153163
*/
154164
public function getTrackUrl($order)
155165
{
@@ -159,6 +169,8 @@ public function getTrackUrl($order)
159169
}
160170

161171
/**
172+
* Get reorder URL
173+
*
162174
* @param object $order
163175
* @return string
164176
*/
@@ -168,6 +180,8 @@ public function getReorderUrl($order)
168180
}
169181

170182
/**
183+
* Get customer account URL
184+
*
171185
* @return string
172186
*/
173187
public function getBackUrl()

app/code/Magento/Sales/Block/Order/Recent.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
}
7272

7373
/**
74-
* @return void
74+
* @inheritDoc
7575
*/
7676
protected function _construct()
7777
{
@@ -105,6 +105,8 @@ private function getRecentOrders()
105105
}
106106

107107
/**
108+
* Get order view URL
109+
*
108110
* @param object $order
109111
* @return string
110112
*/
@@ -114,9 +116,12 @@ public function getViewUrl($order)
114116
}
115117

116118
/**
119+
* Get order track URL
120+
*
117121
* @param object $order
118122
* @return string
119123
* @deprecated Action does not exist
124+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
120125
*/
121126
public function getTrackUrl($order)
122127
{
@@ -126,7 +131,7 @@ public function getTrackUrl($order)
126131
}
127132

128133
/**
129-
* @return string
134+
* @inheritDoc
130135
*/
131136
protected function _toHtml()
132137
{
@@ -137,6 +142,8 @@ protected function _toHtml()
137142
}
138143

139144
/**
145+
* Get reorder URL
146+
*
140147
* @param object $order
141148
* @return string
142149
*/

0 commit comments

Comments
 (0)