6
6
namespace Magento \Sales \Block \Adminhtml \Order \Create \Form ;
7
7
8
8
use Magento \Framework \Pricing \PriceCurrencyInterface ;
9
+ use Magento \Customer \Api \Data \AttributeMetadataInterface ;
9
10
10
11
/**
11
12
* Sales Order Create Form Abstract Block
@@ -57,8 +58,7 @@ public function __construct(
57
58
}
58
59
59
60
/**
60
- * Prepare global layout
61
- * Add renderers to \Magento\Framework\Data\Form
61
+ * Prepare global layout. Add renderers to \Magento\Framework\Data\Form
62
62
*
63
63
* @return $this
64
64
*/
@@ -152,7 +152,7 @@ protected function _addAdditionalFormElementData(\Magento\Framework\Data\Form\El
152
152
/**
153
153
* Add rendering EAV attributes to Form element
154
154
*
155
- * @param \Magento\Customer\Api\Data\ AttributeMetadataInterface[] $attributes
155
+ * @param AttributeMetadataInterface[] $attributes
156
156
* @param \Magento\Framework\Data\Form\AbstractForm $form
157
157
* @return $this
158
158
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -231,11 +231,11 @@ public function getFormValues()
231
231
/**
232
232
* Retrieve frontend classes according validation rules
233
233
*
234
- * @param \Magento\Customer\Api\Data\ AttributeMetadataInterface $attribute
234
+ * @param AttributeMetadataInterface $attribute
235
235
*
236
236
* @return string
237
237
*/
238
- private function getValidationClasses (\ Magento \ Customer \ Api \ Data \ AttributeMetadataInterface $ attribute ) : string
238
+ private function getValidationClasses (AttributeMetadataInterface $ attribute ) : string
239
239
{
240
240
$ out = [];
241
241
$ out [] = $ attribute ->getFrontendClass ();
@@ -252,23 +252,23 @@ private function getValidationClasses(\Magento\Customer\Api\Data\AttributeMetada
252
252
/**
253
253
* Retrieve validation classes by min_text_length and max_text_length rules
254
254
*
255
- * @param \Magento\Customer\Api\Data\ AttributeMetadataInterface $attribute
255
+ * @param AttributeMetadataInterface $attribute
256
256
*
257
257
* @return array
258
258
*/
259
- private function getTextLengthValidateClasses (\ Magento \ Customer \ Api \ Data \ AttributeMetadataInterface $ attribute ) : array
259
+ private function getTextLengthValidateClasses (AttributeMetadataInterface $ attribute ) : array
260
260
{
261
261
$ classes = [];
262
262
263
263
$ validateRules = $ attribute ->getValidationRules ();
264
- if (!empty ($ validateRules )) {
264
+ if (!empty ($ validateRules )) {
265
265
foreach ($ validateRules as $ rule ) {
266
266
switch ($ rule ->getName ()) {
267
- case 'min_text_length ' :
267
+ case 'min_text_length ' :
268
268
$ classes [] = 'minimum-length- ' . $ rule ->getValue ();
269
269
break ;
270
270
271
- case 'max_text_length ' :
271
+ case 'max_text_length ' :
272
272
$ classes [] = 'maximum-length- ' . $ rule ->getValue ();
273
273
break ;
274
274
}
0 commit comments