8
8
use Magento \Customer \Model \Address \AddressModelInterface ;
9
9
use Magento \Customer \Model \Address \Mapper ;
10
10
use Magento \Customer \Model \Metadata \ElementFactory ;
11
+ use Magento \Directory \Model \Country \Format ;
11
12
use Magento \Framework \View \Element \AbstractBlock ;
12
13
13
14
/**
@@ -91,6 +92,8 @@ public function setType(\Magento\Framework\DataObject $type)
91
92
}
92
93
93
94
/**
95
+ * Get the format of the address
96
+ *
94
97
* @param AddressModelInterface|null $address
95
98
* @return string
96
99
* All new code should use renderArray based on Metadata service
@@ -106,8 +109,11 @@ public function getFormat(AddressModelInterface $address = null)
106
109
}
107
110
108
111
/**
109
- * {@inheritdoc}
112
+ * Render address
110
113
*
114
+ * @param AddressModelInterface $address
115
+ * @param string|null $format
116
+ * @return mixed
111
117
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
112
118
* @SuppressWarnings(PHPMD.NPathComplexity)
113
119
*/
@@ -118,7 +124,7 @@ public function render(AddressModelInterface $address, $format = null)
118
124
}
119
125
120
126
/**
121
- * { @inheritdoc}
127
+ * @inheritdoc
122
128
*/
123
129
public function getFormatArray ($ addressAttributes = null )
124
130
{
@@ -133,8 +139,11 @@ public function getFormatArray($addressAttributes = null)
133
139
}
134
140
135
141
/**
136
- * {@inheritdoc}
142
+ * Render address by attribute array
137
143
*
144
+ * @param array $addressAttributes
145
+ * @param Format|null $format
146
+ * @return string
138
147
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
139
148
* @SuppressWarnings(PHPMD.NPathComplexity)
140
149
*/
0 commit comments