Skip to content

Commit ff4ead5

Browse files
committed
Resolve codestyle errors
1 parent 10cc12a commit ff4ead5

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

app/code/Magento/Customer/ViewModel/Address.php

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* Customer address view model.
1515
*/
1616

17+
/**
18+
* Address view model
19+
*/
1720
class Address implements ArgumentInterface
1821
{
1922
/**
@@ -31,43 +34,75 @@ class Address implements ArgumentInterface
3134
private $helperAddress;
3235

3336
/**
34-
* @param Data $helperData
35-
* @param Address $helperAddress
37+
* Constructor
38+
*
39+
* @param DataHelper $helperData
40+
* @param AddressHelper $helperAddress
3641
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3742
*/
3843
public function __construct(
39-
Data $helperData,
40-
Address $helperAddress
44+
DataHelper $helperData,
45+
AddressHelper $helperAddress
4146
) {
4247
$this->helperData= $helperData;
4348
$this->helperAddress= $helperAddress;
4449
}
4550

51+
/**
52+
* Returns data validation class
53+
*
54+
* @return mixed
55+
*/
4656
public function dataGetAttributeValidationClass($param)
4757
{
48-
return $this->dataAddress->getAttributeValidationClass($param);
58+
return $this->helperData->getAttributeValidationClass($param);
4959
}
5060

61+
/**
62+
* Returns address validation class
63+
*
64+
* @return mixed
65+
*/
5166
public function addressGetAttributeValidationClass($param)
5267
{
5368
return $this->helperAddress->getAttributeValidationClass($param);
5469
}
5570

71+
/**
72+
* Returns street lines
73+
*
74+
* @return mixed
75+
*/
5676
public function addressGetStreetLines()
5777
{
5878
return $this->helperAddress->getStreetLines();
5979
}
6080

81+
/**
82+
* Returns if VAT attribute is visible
83+
*
84+
* @return boolean
85+
*/
6186
public function addressIsVatAttributeVisible()
6287
{
6388
return $this->helperAddress->isVatAttributeVisible();
6489
}
6590

91+
/**
92+
* Returns region JSON
93+
*
94+
* @return mixed
95+
*/
6696
public function dataGetRegionJson()
6797
{
6898
return $this->helperData->getRegionJson();
6999
}
70100

101+
/**
102+
* Returns rcountries with optional zip
103+
*
104+
* @return mixed
105+
*/
71106
public function dataGetCountriesWithOptionalZip()
72107
{
73108
return $this->helperData->getCountriesWithOptionalZip();

app/code/Magento/Customer/view/frontend/templates/address/edit.phtml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ $viewModel = $block->getData('viewModel');
1818
<?php $_selectRegion = 'Please select a region, state or province.'; ?>
1919
<?php $_displayAll = $block->getConfig('general/region/display_all'); ?>
2020

21-
<?php $_dataHelper = $this->helper(\Magento\Directory\Helper\Data::class); ?>
22-
<?php $_addressHelper = $this->helper(\Magento\Customer\Helper\Address::class); ?>
23-
2421
<?php $_vatidValidationClass = $viewModel->addressGetAttributeValidationClass('vat_id'); ?>
2522
<?php $_cityValidationClass = $viewModel->addressGetAttributeValidationClass('city'); ?>
2623
<?php $_postcodeValidationClass_value = $viewModel->addressGetAttributeValidationClass('postcode'); ?>

0 commit comments

Comments
 (0)