/** * @param \Magento\Catalog\Model\Resource\Eav\Attribute $subject * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute * @return \Magento\Catalog\Model\Resource\Eav\Attribute * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterDelete(\Magento\Catalog\Model\Resource\Eav\Attribute $subject, \Magento\Catalog\Model\Resource\Eav\Attribute $attribute) { if ($attribute->getIsUsedForPromoRules()) { $this->checkCatalogRulesAvailability($attribute->getAttributeCode()); } return $attribute; }