File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
app/code/Magento/Sales/Model/Order/Address Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ public function __construct(
60
60
$ this ->countryFactory = $ countryFactory ;
61
61
$ this ->eavConfig = $ eavConfig ?: ObjectManager::getInstance ()
62
62
->get (EavConfig::class);
63
+ }
64
+
65
+ /**
66
+ *
67
+ * @param \Magento\Sales\Model\Order\Address $address
68
+ * @return array
69
+ */
70
+ public function validate (Address $ address )
71
+ {
72
+ $ warnings = [];
63
73
64
74
if ($ this ->isTelephoneRequired ()) {
65
75
$ this ->required ['telephone ' ] = 'Phone Number ' ;
@@ -72,16 +82,7 @@ public function __construct(
72
82
if ($ this ->isFaxRequired ()) {
73
83
$ this ->required ['fax ' ] = 'Fax ' ;
74
84
}
75
- }
76
85
77
- /**
78
- *
79
- * @param \Magento\Sales\Model\Order\Address $address
80
- * @return array
81
- */
82
- public function validate (Address $ address )
83
- {
84
- $ warnings = [];
85
86
foreach ($ this ->required as $ code => $ label ) {
86
87
if (!$ address ->hasData ($ code )) {
87
88
$ warnings [] = sprintf ('%s is a required field ' , $ label );
You can’t perform that action at this time.
0 commit comments