Skip to content

Commit 07a95cc

Browse files
author
Patrik Pihlström
committed
adjustments for style standard
1 parent 284f966 commit 07a95cc

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

app/code/Magento/CatalogUrlRewrite/Plugin/Eav/Model/AttributeSetRepository.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace Magento\CatalogUrlRewrite\Plugin\Eav\Model;
1010

11-
1211
use Magento\Catalog\Model\ResourceModel\Product\Collection;
1312
use Magento\Eav\Api\Data\AttributeSetInterface;
1413
use Magento\UrlRewrite\Model\UrlPersistInterface;
@@ -43,9 +42,11 @@ public function __construct(UrlPersistInterface $urlPersist, Collection $product
4342
* @param callable $proceed
4443
* @param AttributeSetInterface $attributeSet
4544
*/
46-
public function aroundDelete(\Magento\Eav\Model\AttributeSetRepository $subject, callable $proceed,
47-
AttributeSetInterface $attributeSet)
48-
{
45+
public function aroundDelete(
46+
\Magento\Eav\Model\AttributeSetRepository $subject,
47+
callable $proceed,
48+
AttributeSetInterface $attributeSet
49+
) {
4950
// Get the product ids
5051
$ids = $this->productCollection->addFieldToFilter('attribute_set_id', $attributeSet->getAttributeSetId())
5152
->getAllIds();
@@ -54,15 +55,12 @@ public function aroundDelete(\Magento\Eav\Model\AttributeSetRepository $subject,
5455
$result = $proceed($attributeSet);
5556

5657
// Delete the old product url rewrites
57-
try
58-
{
58+
try {
5959
$this->urlPersist->deleteByData(['entity_id' => $ids, 'entity_type' => 'product']);
60-
}
61-
catch (\Exception $exception)
62-
{
60+
} catch (\Exception $exception) {
6361
throw new CouldNotDeleteException(__('Could not delete the url rewrite(s): %1', $exception->getMessage()));
6462
}
6563

6664
return $result;
6765
}
68-
}
66+
}

0 commit comments

Comments
 (0)