@@ -41,10 +41,13 @@ class Configurable extends \Magento\CatalogImportExport\Model\Import\Product\Typ
41
41
42
42
const ERROR_UNIDENTIFIABLE_VARIATION = 'unidentifiableVariation ' ;
43
43
44
+ // @codingStandardsIgnoreStart
44
45
/**
45
46
* Validation failure message template definitions
46
47
*
47
48
* @var array
49
+ *
50
+ * Note: Many of these messages exceed maximum limit of 120 characters. Ignore from coding standards.
48
51
*/
49
52
protected $ _messageTemplates = [
50
53
self ::ERROR_ATTRIBUTE_CODE_DOES_NOT_EXIST => 'Column configurable_variations: Attribute with code "%s" does not exist or is missing from product attribute set ' ,
@@ -56,6 +59,7 @@ class Configurable extends \Magento\CatalogImportExport\Model\Import\Product\Typ
56
59
self ::ERROR_DUPLICATED_VARIATIONS => 'SKU %s contains duplicated variations ' ,
57
60
self ::ERROR_UNIDENTIFIABLE_VARIATION => 'Configurable variation "%s" is unidentifiable ' ,
58
61
];
62
+ // @codingStandardsIgnoreEnd
59
63
60
64
/**
61
65
* Column names that holds values with particular meaning.
@@ -300,8 +304,7 @@ protected function _isParticularAttributesValid(array $rowData, $rowNum)
300
304
$ superAttrCode = $ rowData ['_super_attribute_code ' ];
301
305
if (!$ this ->_isAttributeSuper ($ superAttrCode )) {
302
306
// Identify reason why attribute is not super:
303
- if (!$ this ->_identifySuperAttributeError ($ superAttrCode , $ rowNum ))
304
- {
307
+ if (!$ this ->_identifySuperAttributeError ($ superAttrCode , $ rowNum )) {
305
308
$ this ->_entityModel ->addRowError (self ::ERROR_ATTRIBUTE_CODE_IS_NOT_SUPER , $ rowNum , $ superAttrCode );
306
309
}
307
310
return false ;
@@ -334,36 +337,29 @@ protected function _identifySuperAttributeError($superAttrCode, $rowNum)
334
337
// Does this attribute code exist? Does is have the correct settings?
335
338
$ commonAttributes = self ::$ commonAttributesCache ;
336
339
foreach ($ commonAttributes as $ attributeRow ) {
337
-
338
- if ($ attributeRow ['code ' ] == $ superAttrCode )
339
- {
340
+ if ($ attributeRow ['code ' ] == $ superAttrCode ) {
340
341
$ codeExists = true ;
341
342
342
- if ($ attributeRow ['is_global ' ] !== '1 ' )
343
- {
343
+ if ($ attributeRow ['is_global ' ] !== '1 ' ) {
344
344
$ codeNotGlobal = true ;
345
345
}
346
- elseif ($ attributeRow ['type ' ] !== 'select ' )
347
- {
346
+ elseif ($ attributeRow ['type ' ] !== 'select ' ) {
348
347
$ codeNotTypeSelect = true ;
349
348
}
350
349
351
350
break ;
352
351
}
353
352
}
354
353
355
- if ($ codeExists == false )
356
- {
354
+ if ($ codeExists == false ) {
357
355
$ this ->_entityModel ->addRowError (self ::ERROR_ATTRIBUTE_CODE_DOES_NOT_EXIST , $ rowNum , $ superAttrCode );
358
356
$ reasonFound = true ;
359
357
}
360
- elseif ($ codeNotGlobal == true )
361
- {
358
+ elseif ($ codeNotGlobal == true ) {
362
359
$ this ->_entityModel ->addRowError (self ::ERROR_ATTRIBUTE_CODE_NOT_GLOBAL_SCOPE , $ rowNum , $ superAttrCode );
363
360
$ reasonFound = true ;
364
361
}
365
- elseif ($ codeNotTypeSelect == true )
366
- {
362
+ elseif ($ codeNotTypeSelect == true ) {
367
363
$ this ->_entityModel ->addRowError (self ::ERROR_ATTRIBUTE_CODE_NOT_TYPE_SELECT , $ rowNum , $ superAttrCode );
368
364
$ reasonFound = true ;
369
365
}
0 commit comments