Skip to content

Commit a8d8ace

Browse files
committed
MAGETWO-94347: Implement handling of large number of addresses on storefront Address book
1 parent 9dd5671 commit a8d8ace

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app/code/Magento/Customer/Block/Address/Book.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ public function getCustomer()
203203
}
204204

205205
/**
206+
* Get customer's default billing address
207+
*
206208
* @return int|null
207209
*/
208210
public function getDefaultBilling()
@@ -232,6 +234,8 @@ public function getAddressById($addressId)
232234
}
233235

234236
/**
237+
* Get customer's default shipping address
238+
*
235239
* @return int|null
236240
*/
237241
public function getDefaultShipping()

app/code/Magento/Customer/Block/Address/Grid.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
/**
1414
* Customer address grid
15+
*
16+
* @api
1517
*/
1618
class Grid extends \Magento\Framework\View\Element\Template
1719
{
@@ -169,9 +171,9 @@ public function getCountryByCode($countryCode): string
169171
return $country->loadByCode($countryCode)->getName();
170172
}
171173

172-
173174
/**
174175
* Get default billing address
176+
*
175177
* Return address string if address found and null of not
176178
*
177179
* @return int
@@ -184,9 +186,9 @@ private function getDefaultBilling(): int
184186
return (int)$customer->getDefaultBilling();
185187
}
186188

187-
188189
/**
189190
* Get default shipping address
191+
*
190192
* Return address string if address found and null of not
191193
*
192194
* @return int
@@ -202,7 +204,7 @@ private function getDefaultShipping(): int
202204
/**
203205
* Get pager layout
204206
*
205-
* @return f
207+
* @return void
206208
* @throws \Magento\Framework\Exception\LocalizedException
207209
*/
208210
private function preparePager(): void

app/code/Magento/Customer/Test/Unit/Block/Address/GridTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Unit tests for \Magento\Customer\Block\Address\Grid class
12+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1213
*/
1314
class GridTest extends \PHPUnit\Framework\TestCase
1415
{

0 commit comments

Comments
 (0)