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 @@ -61,6 +61,16 @@ public function __construct(
61
61
$ this ->countryFactory = $ countryFactory ;
62
62
$ this ->eavConfig = $ eavConfig ?: ObjectManager::getInstance ()
63
63
->get (EavConfig::class);
64
+ }
65
+
66
+ /**
67
+ *
68
+ * @param \Magento\Sales\Model\Order\Address $address
69
+ * @return array
70
+ */
71
+ public function validate (Address $ address )
72
+ {
73
+ $ warnings = [];
64
74
65
75
if ($ this ->isTelephoneRequired ()) {
66
76
$ this ->required ['telephone ' ] = 'Phone Number ' ;
@@ -73,16 +83,7 @@ public function __construct(
73
83
if ($ this ->isFaxRequired ()) {
74
84
$ this ->required ['fax ' ] = 'Fax ' ;
75
85
}
76
- }
77
86
78
- /**
79
- *
80
- * @param \Magento\Sales\Model\Order\Address $address
81
- * @return array
82
- */
83
- public function validate (Address $ address )
84
- {
85
- $ warnings = [];
86
87
foreach ($ this ->required as $ code => $ label ) {
87
88
if (!$ address ->hasData ($ code )) {
88
89
$ warnings [] = sprintf ('"%s" is required. Enter and try again. ' , $ label );
You can’t perform that action at this time.
0 commit comments