Skip to content

Commit 2a3e5dd

Browse files
ENGCOM-4482: Fix #21692 - logic in constructor of address validator #21693
- Merge Pull Request #21693 from Bartlomiejsz/magento2:feature/fix_21692_incorrect_constructor - Merged commits: 1. 28b047e 2. b92ffa2 3. fda4377 4. b2004c3 5. b86f981 6. 73d88aa 7. 9c7fbfd 8. e09429f
2 parents b1d55f8 + e09429f commit 2a3e5dd

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

app/code/Magento/Sales/Model/Order/Address/Validator.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class Validator
4949

5050
/**
5151
* @param DirectoryHelper $directoryHelper
52-
* @param CountryFactory $countryFactory
53-
* @param EavConfig $eavConfig
52+
* @param CountryFactory $countryFactory
53+
* @param EavConfig $eavConfig
5454
*/
5555
public function __construct(
5656
DirectoryHelper $directoryHelper,
@@ -64,6 +64,7 @@ public function __construct(
6464
}
6565

6666
/**
67+
* Validate address.
6768
*
6869
* @param \Magento\Sales\Model\Order\Address $address
6970
* @return array
@@ -196,23 +197,32 @@ protected function isStateRequired($countryId)
196197
}
197198

198199
/**
200+
* Check whether telephone is required for address.
201+
*
199202
* @return bool
203+
* @throws \Magento\Framework\Exception\LocalizedException
200204
*/
201205
protected function isTelephoneRequired()
202206
{
203207
return ($this->eavConfig->getAttribute('customer_address', 'telephone')->getIsRequired());
204208
}
205209

206210
/**
211+
* Check whether company is required for address.
212+
*
207213
* @return bool
214+
* @throws \Magento\Framework\Exception\LocalizedException
208215
*/
209216
protected function isCompanyRequired()
210217
{
211218
return ($this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired());
212219
}
213220

214221
/**
222+
* Check whether telephone is required for address.
223+
*
215224
* @return bool
225+
* @throws \Magento\Framework\Exception\LocalizedException
216226
*/
217227
protected function isFaxRequired()
218228
{

lib/internal/Magento/Framework/Locale/Format.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\Framework\Locale;
77

8+
/**
9+
* Price locale format.
10+
*/
811
class Format implements \Magento\Framework\Locale\FormatInterface
912
{
1013
/**
@@ -38,7 +41,8 @@ public function __construct(
3841
}
3942

4043
/**
41-
* Returns the first found number from a string
44+
* Returns the first found number from a string.
45+
*
4246
* Parsing depends on given locale (grouping and decimal)
4347
*
4448
* Examples for input:

lib/internal/Magento/Framework/Locale/Resolver.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\Framework\App\DeploymentConfig;
1010
use Magento\Framework\App\ObjectManager;
1111

12+
/**
13+
* Manages locale config information.
14+
*/
1215
class Resolver implements ResolverInterface
1316
{
1417
/**
@@ -81,15 +84,15 @@ public function __construct(
8184
}
8285

8386
/**
84-
* {@inheritdoc}
87+
* @inheritdoc
8588
*/
8689
public function getDefaultLocalePath()
8790
{
8891
return $this->defaultLocalePath;
8992
}
9093

9194
/**
92-
* {@inheritdoc}
95+
* @inheritdoc
9396
*/
9497
public function setDefaultLocale($locale)
9598
{
@@ -98,7 +101,7 @@ public function setDefaultLocale($locale)
98101
}
99102

100103
/**
101-
* {@inheritdoc}
104+
* @inheritdoc
102105
*/
103106
public function getDefaultLocale()
104107
{
@@ -116,7 +119,7 @@ public function getDefaultLocale()
116119
}
117120

118121
/**
119-
* {@inheritdoc}
122+
* @inheritdoc
120123
*/
121124
public function setLocale($locale = null)
122125
{
@@ -129,7 +132,7 @@ public function setLocale($locale = null)
129132
}
130133

131134
/**
132-
* {@inheritdoc}
135+
* @inheritdoc
133136
*/
134137
public function getLocale()
135138
{
@@ -140,7 +143,7 @@ public function getLocale()
140143
}
141144

142145
/**
143-
* {@inheritdoc}
146+
* @inheritdoc
144147
*/
145148
public function emulate($scopeId)
146149
{
@@ -160,7 +163,7 @@ public function emulate($scopeId)
160163
}
161164

162165
/**
163-
* {@inheritdoc}
166+
* @inheritdoc
164167
*/
165168
public function revert()
166169
{

0 commit comments

Comments
 (0)