Skip to content

Commit adb1a8f

Browse files
committed
Declaring strict typing
1 parent 6f83604 commit adb1a8f

File tree

1 file changed

+5
-2
lines changed
  • app/code/Magento/Eav/Model/Validator/Attribute

1 file changed

+5
-2
lines changed

app/code/Magento/Eav/Model/Validator/Attribute/Code.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Eav\Model\Validator\Attribute;
89

910
use Magento\Eav\Model\Entity\Attribute;
1011
use Magento\Framework\Exception\LocalizedException;
12+
use Magento\Framework\Validator\AbstractValidator;
13+
use Zend_Validate;
1114

1215
/**
1316
* Class Code
1417
*
1518
* Validation EAV attribute code
1619
*/
17-
class Code extends \Magento\Framework\Validator\AbstractValidator
20+
class Code extends AbstractValidator
1821
{
1922
/**
2023
* Validates the correctness of the attribute code
@@ -45,7 +48,7 @@ public function isValid($attributeCode)
4548
*/
4649
$minLength = Attribute::ATTRIBUTE_CODE_MIN_LENGTH;
4750
$maxLength = Attribute::ATTRIBUTE_CODE_MAX_LENGTH;
48-
$isAllowedLength = \Zend_Validate::is(
51+
$isAllowedLength = Zend_Validate::is(
4952
trim($attributeCode),
5053
'StringLength',
5154
['min' => $minLength, 'max' => $maxLength]

0 commit comments

Comments
 (0)