Skip to content

Cleaning up unused code. #33499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
namespace Magento\CatalogInventory\Model;

use Magento\Catalog\Model\CollectionConditionInterface;
use Magento\Eav\Model\Entity\Collection\AbstractCollection;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\Data\CollectionModifierInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

namespace Magento\CatalogInventory\Model\ResourceModel\Stock\Item;

use Magento\CatalogInventory\Api\StockItemCriteriaInterface;
use Magento\Framework\Data\AbstractCriteria;
use Magento\CatalogInventory\Model\ResourceModel\Stock\Item\StockItemCriteriaMapper;

/**
* Class StockItemCriteria
*/
class StockItemCriteria extends AbstractCriteria implements \Magento\CatalogInventory\Api\StockItemCriteriaInterface
class StockItemCriteria extends AbstractCriteria implements StockItemCriteriaInterface
{
/**
* @param string $mapper
Expand Down Expand Up @@ -80,10 +80,10 @@ public function setQtyFilter($comparisonMethod, $qty)
/**
* Add Criteria object
*
* @param \Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria
* @param StockItemCriteriaInterface $criteria
* @return bool
*/
public function addCriteria(\Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria)
public function addCriteria(StockItemCriteriaInterface $criteria)
{
$this->data[self::PART_CRITERIA_LIST]['list'][] = $criteria;
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

namespace Magento\CatalogInventory\Model\ResourceModel\Stock\Status;

use Magento\CatalogInventory\Api\StockStatusCriteriaInterface;
use Magento\Framework\Data\AbstractCriteria;
use Magento\CatalogInventory\Model\ResourceModel\Stock\Status\StockStatusCriteriaMapper;

/**
* Class StockStatusCriteria
*/
class StockStatusCriteria extends AbstractCriteria implements \Magento\CatalogInventory\Api\StockStatusCriteriaInterface
class StockStatusCriteria extends AbstractCriteria implements StockStatusCriteriaInterface
{
/**
* @param string $mapper
Expand Down Expand Up @@ -50,7 +50,7 @@ public function setQtyFilter($qty)
/**
* @inheritdoc
*/
public function addCriteria(\Magento\CatalogInventory\Api\StockStatusCriteriaInterface $criteria)
public function addCriteria(StockStatusCriteriaInterface $criteria)
{
$this->data[self::PART_CRITERIA_LIST]['list'][] = $criteria;
}
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/CatalogInventory/Model/StockRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getStock($scopeId = null)
/**
* @param int $productId
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
* @return StockItemInterface
*/
public function getStockItem($productId, $scopeId = null)
{
Expand All @@ -91,7 +91,7 @@ public function getStockItem($productId, $scopeId = null)
/**
* @param string $productSku
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
* @return StockItemInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getStockItemBySku($productSku, $scopeId = null)
Expand Down Expand Up @@ -167,7 +167,7 @@ public function getLowStockItems($scopeId, $qty, $currentPage = 1, $pageSize = 0
/**
* @inheritdoc
*/
public function updateStockItemBySku($productSku, \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem)
public function updateStockItemBySku($productSku, StockItemInterface $stockItem)
{
$productId = $this->resolveProductId($productSku);
$websiteId = $stockItem->getWebsiteId() ?: null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Magento\CatalogInventory\Api\StockCriteriaInterfaceFactory;
use Magento\CatalogInventory\Api\StockItemCriteriaInterfaceFactory;
use Magento\CatalogInventory\Api\StockStatusCriteriaInterfaceFactory;
use Magento\Store\Model\StoreManagerInterface;

/**
* Class StockRegistryProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Magento\CatalogInventory\Setup\Patch\Data;

use Magento\CatalogInventory\Model\Indexer\Stock\Processor;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;
Expand Down