Skip to content

Commit 1eed0f1

Browse files
committed
Add missing parameter and update DocBlocks
1 parent 60b7f1c commit 1eed0f1

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

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

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Magento\Directory\Helper\Data as DataHelper;
1010
use Magento\Customer\Helper\Address as AddressHelper;
11+
use Magento\Framework\Exception\NoSuchEntityException;
1112
use Magento\Framework\View\Element\Block\ArgumentInterface;
1213

1314
/**
@@ -49,39 +50,49 @@ public function __construct(
4950
}
5051

5152
/**
52-
* Returns data validation class
53+
* Get string with frontend validation classes for attribute
5354
*
54-
* @param mixed $param
55-
* @return mixed
55+
* @param string $attributeCode
56+
*
57+
* @return string
58+
*
59+
* @throws \Magento\Framework\Exception\LocalizedException
5660
*/
57-
public function dataGetAttributeValidationClass($param)
61+
public function dataGetAttributeValidationClass($attributeCode)
5862
{
59-
return $this->helperData->getAttributeValidationClass($param);
63+
return $this->helperData->getAttributeValidationClass($attributeCode);
6064
}
6165

6266
/**
63-
* Returns address validation class
67+
* Get string with frontend validation classes for attribute
68+
*
69+
* @param string $attributeCode
6470
*
65-
* @param mixed $param
66-
* @return mixed
71+
* @return string
72+
*
73+
* @throws \Magento\Framework\Exception\LocalizedException
6774
*/
68-
public function addressGetAttributeValidationClass($param)
75+
public function addressGetAttributeValidationClass($attributeCode)
6976
{
70-
return $this->helperAddress->getAttributeValidationClass($param);
77+
return $this->helperAddress->getAttributeValidationClass($attributeCode);
7178
}
7279

7380
/**
74-
* Returns street lines
81+
* Return Number of Lines in a Street Address for store
82+
*
83+
* @param \Magento\Store\Model\Store|int|string $store
7584
*
76-
* @return mixed
85+
* @return int
86+
* @throws NoSuchEntityException
87+
* @throws \Magento\Framework\Exception\LocalizedException
7788
*/
7889
public function addressGetStreetLines()
7990
{
8091
return $this->helperAddress->getStreetLines();
8192
}
8293

8394
/**
84-
* Returns if VAT attribute is visible
95+
* Check if VAT ID address attribute has to be shown on frontend (on Customer Address management forms)
8596
*
8697
* @return boolean
8798
*/
@@ -91,22 +102,24 @@ public function addressIsVatAttributeVisible()
91102
}
92103

93104
/**
94-
* Returns region JSON
105+
* Retrieve regions data json
95106
*
96-
* @return mixed
107+
* @return string
108+
* @throws NoSuchEntityException
97109
*/
98110
public function dataGetRegionJson()
99111
{
100112
return $this->helperData->getRegionJson();
101113
}
102114

103115
/**
104-
* Returns rcountries with optional zip
116+
* Return ISO2 country codes, which have optional Zip/Postal pre-configured
105117
*
106-
* @return mixed
118+
* @param bool $asJson
119+
* @return array|string
107120
*/
108-
public function dataGetCountriesWithOptionalZip()
121+
public function dataGetCountriesWithOptionalZip($asJson)
109122
{
110-
return $this->helperData->getCountriesWithOptionalZip();
123+
return $this->helperData->getCountriesWithOptionalZip($asJson);
111124
}
112125
}

0 commit comments

Comments
 (0)