Skip to content

Commit 9eb37ab

Browse files
author
Valeriy Nayda
committed
magento-engcom/magento2#25: Source API Implementation
-- fix static tests
1 parent 49619de commit 9eb37ab

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

app/code/Magento/Inventory/Model/SourceRepository.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111
use Magento\Framework\Exception\CouldNotSaveException;
1212
use Magento\Framework\Exception\NoSuchEntityException;
1313
use Magento\Framework\Exception\StateException;
14-
use Magento\Framework\Model\AbstractModel;
1514
use Magento\Inventory\Model\ResourceModel\Source as ResourceSource;
16-
use Magento\Inventory\Model\ResourceModel\Source\Collection as SourceCollection;
1715
use Magento\Inventory\Model\ResourceModel\Source\CollectionFactory;
1816
use Magento\InventoryApi\Api\Data\SourceInterface;
1917
use Magento\InventoryApi\Api\Data\SourceInterfaceFactory;
20-
use Magento\InventoryApi\Api\Data\SourceSearchResultsInterface;
2118
use Magento\InventoryApi\Api\Data\SourceSearchResultsInterfaceFactory;
2219
use Magento\InventoryApi\Api\SourceRepositoryInterface;
2320
use Psr\Log\LoggerInterface;
@@ -97,7 +94,6 @@ public function __construct(
9794
public function save(SourceInterface $source)
9895
{
9996
try {
100-
/** @var SourceInterface|AbstractModel $source */
10197
$this->resourceSource->save($source);
10298
return $source->getSourceId();
10399
} catch (StateException $e) {
@@ -114,7 +110,6 @@ public function save(SourceInterface $source)
114110
*/
115111
public function get($sourceId)
116112
{
117-
/** @var SourceInterface|AbstractModel $source */
118113
$source = $this->sourceFactory->create();
119114
$this->resourceSource->load($source, $sourceId, SourceInterface::SOURCE_ID);
120115

@@ -129,7 +124,6 @@ public function get($sourceId)
129124
*/
130125
public function getList(SearchCriteriaInterface $searchCriteria = null)
131126
{
132-
/** @var SourceCollection $collection */
133127
$collection = $this->sourceCollectionFactory->create();
134128

135129
if (null === $searchCriteria) {
@@ -138,7 +132,6 @@ public function getList(SearchCriteriaInterface $searchCriteria = null)
138132
$this->collectionProcessor->process($searchCriteria, $collection);
139133
}
140134

141-
/** @var SourceSearchResultsInterface $searchResult */
142135
$searchResult = $this->sourceSearchResultsFactory->create();
143136
$searchResult->setItems($collection->getItems());
144137
$searchResult->setTotalCount($collection->getSize());

0 commit comments

Comments
 (0)