Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Prev Previous commit
Next Next commit
import-export-improvements #82 : configurable variations - not a supe…
…r attribute error message improvements - travis ci build code style fixes
  • Loading branch information
Tadhg Bowe committed Jun 29, 2018
commit a76e3a3e8cd545b16fda1bd56c5db5d6cf687d56
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ protected function _identifySuperAttributeError($superAttrCode, $rowNum)

if ($attributeRow['is_global'] !== '1') {
$codeNotGlobal = true;
}
elseif ($attributeRow['type'] !== 'select') {
} elseif ($attributeRow['type'] !== 'select') {
$codeNotTypeSelect = true;
}

Expand All @@ -354,12 +353,10 @@ protected function _identifySuperAttributeError($superAttrCode, $rowNum)
if ($codeExists == false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are setting these attributes let's do a === check here just to be sure we are dealing with booleans.

$this->_entityModel->addRowError(self::ERROR_ATTRIBUTE_CODE_DOES_NOT_EXIST, $rowNum, $superAttrCode);
$reasonFound = true;
}
elseif ($codeNotGlobal == true) {
} elseif ($codeNotGlobal == true) {
$this->_entityModel->addRowError(self::ERROR_ATTRIBUTE_CODE_NOT_GLOBAL_SCOPE, $rowNum, $superAttrCode);
$reasonFound = true;
}
elseif ($codeNotTypeSelect == true) {
} elseif ($codeNotTypeSelect == true) {
$this->_entityModel->addRowError(self::ERROR_ATTRIBUTE_CODE_NOT_TYPE_SELECT, $rowNum, $superAttrCode);
$reasonFound = true;
}
Expand Down