Skip to content

Commit fda5b4d

Browse files
committed
add return function type
1 parent 00db642 commit fda5b4d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/Catalog/Api/CategoryListDeleteBySkuInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ interface CategoryListDeleteBySkuInterface
2222
* @throws \Magento\Framework\Exception\CouldNotSaveException
2323
* @throws \Magento\Framework\Exception\InputException
2424
*/
25-
public function deleteBySkus($categoryId, array $productSkuList);
25+
public function deleteBySkus(int $categoryId, array $productSkuList): bool;
2626
}

app/code/Magento/Catalog/Model/CategoryLinkRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function deleteByIds($categoryId, $sku)
114114
/**
115115
* {@inheritDoc}
116116
*/
117-
public function deleteBySkus($categoryId, array $productSkuList)
117+
public function deleteBySkus(int $categoryId, array $productSkuList): bool
118118
{
119119
$category = $this->categoryRepository->get($categoryId);
120120
$products = $this->productResource->getProductsIdsBySkus($productSkuList);

app/code/Magento/Catalog/Test/Unit/Model/CategoryLinkRepositoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function testDelete()
207207

208208
public function testDeleteBySkus()
209209
{
210-
$categoryId = "42";
210+
$categoryId = 42;
211211
$productSku = "testSku";
212212
$productId = 55;
213213
$productPositions = [55 => 1];
@@ -231,7 +231,7 @@ public function testDeleteBySkus()
231231
*/
232232
public function testDeleteBySkusWithInputException()
233233
{
234-
$categoryId = "42";
234+
$categoryId = 42;
235235
$productSku = "testSku";
236236
$categoryMock = $this->createPartialMock(
237237
\Magento\Catalog\Model\Category::class,
@@ -248,7 +248,7 @@ public function testDeleteBySkusWithInputException()
248248
*/
249249
public function testDeleteSkusIdsWithCouldNotSaveException()
250250
{
251-
$categoryId = "42";
251+
$categoryId = 42;
252252
$productSku = "testSku";
253253
$productId = 55;
254254
$productPositions = [55 => 1];

0 commit comments

Comments
 (0)