Skip to content

Commit bd06fc9

Browse files
committed
magento-engcom/magento2ce#2680: Fixed static tests
1 parent f555830 commit bd06fc9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Sales\Block\Adminhtml\Order\Create\Form;
77

88
use Magento\Framework\Pricing\PriceCurrencyInterface;
9+
use Magento\Customer\Api\Data\AttributeMetadataInterface;
910

1011
/**
1112
* Sales Order Create Form Abstract Block
@@ -57,8 +58,7 @@ public function __construct(
5758
}
5859

5960
/**
60-
* Prepare global layout
61-
* Add renderers to \Magento\Framework\Data\Form
61+
* Prepare global layout. Add renderers to \Magento\Framework\Data\Form
6262
*
6363
* @return $this
6464
*/
@@ -152,7 +152,7 @@ protected function _addAdditionalFormElementData(\Magento\Framework\Data\Form\El
152152
/**
153153
* Add rendering EAV attributes to Form element
154154
*
155-
* @param \Magento\Customer\Api\Data\AttributeMetadataInterface[] $attributes
155+
* @param AttributeMetadataInterface[] $attributes
156156
* @param \Magento\Framework\Data\Form\AbstractForm $form
157157
* @return $this
158158
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -231,11 +231,11 @@ public function getFormValues()
231231
/**
232232
* Retrieve frontend classes according validation rules
233233
*
234-
* @param \Magento\Customer\Api\Data\AttributeMetadataInterface $attribute
234+
* @param AttributeMetadataInterface $attribute
235235
*
236236
* @return string
237237
*/
238-
private function getValidationClasses(\Magento\Customer\Api\Data\AttributeMetadataInterface $attribute) : string
238+
private function getValidationClasses(AttributeMetadataInterface $attribute) : string
239239
{
240240
$out = [];
241241
$out[] = $attribute->getFrontendClass();
@@ -252,23 +252,23 @@ private function getValidationClasses(\Magento\Customer\Api\Data\AttributeMetada
252252
/**
253253
* Retrieve validation classes by min_text_length and max_text_length rules
254254
*
255-
* @param \Magento\Customer\Api\Data\AttributeMetadataInterface $attribute
255+
* @param AttributeMetadataInterface $attribute
256256
*
257257
* @return array
258258
*/
259-
private function getTextLengthValidateClasses(\Magento\Customer\Api\Data\AttributeMetadataInterface $attribute) : array
259+
private function getTextLengthValidateClasses(AttributeMetadataInterface $attribute) : array
260260
{
261261
$classes = [];
262262

263263
$validateRules = $attribute->getValidationRules();
264-
if(!empty($validateRules)) {
264+
if (!empty($validateRules)) {
265265
foreach ($validateRules as $rule) {
266266
switch ($rule->getName()) {
267-
case 'min_text_length' :
267+
case 'min_text_length':
268268
$classes[] = 'minimum-length-' . $rule->getValue();
269269
break;
270270

271-
case 'max_text_length' :
271+
case 'max_text_length':
272272
$classes[] = 'maximum-length-' . $rule->getValue();
273273
break;
274274
}

0 commit comments

Comments
 (0)