Skip to content

Commit

Permalink
ASYNC-IMPORT-37: Fix static
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepa4man committed Feb 12, 2019
1 parent 32da20f commit fb20539
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
10 changes: 10 additions & 0 deletions app/code/Magento/ImportService/Api/SourceRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,40 @@
interface SourceRepositoryInterface
{
/**
* Saves source
*
* @param \Magento\ImportService\Api\Data\SourceInterface $source
* @return \Magento\ImportService\Api\Data\SourceInterface
*/
public function save(SourceInterface $source);

/**
* Provides source by ID
*
* @param int $id
* @return \Magento\ImportService\Api\Data\SourceInterface
*/
public function getById($id);

/**
* Provides sources which match a specific criteria.
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $criteria
* @return \Magento\Framework\Api\SearchResultsInterface
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria);

/**
* Deletes source
*
* @param \Magento\ImportService\Api\Data\SourceInterface $source
* @return bool
*/
public function delete(\Magento\ImportService\Api\Data\SourceInterface $source);

/**
* Deletes source by ID
*
* @param int $id
* @return bool
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
class Collection extends AbstractCollection
{
/**
* Source collection constructor
*/
protected function _construct()
{
$this->_init(Source::class, SourceResourceModel::class);
Expand Down
17 changes: 9 additions & 8 deletions app/code/Magento/ImportService/Model/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Magento\ImportService\Model;

use Magento\Framework\Model\AbstractModel;
use Magento\ImportService\Api\Data\SourceExtensionInterface;
use Magento\ImportService\Api\Data\SourceInterface;
use Magento\ImportService\Model\ResourceModel\Source as SourceResource;

Expand All @@ -18,12 +19,17 @@ class Source extends AbstractModel implements SourceInterface
{
const CACHE_TAG = 'magento_import_service_source';

/**
* Source constructor
*/
protected function _construct()
{
$this->_init(SourceResource::class);
}

/**
* Get unique page cache identities
*
* @return array
*/
public function getIdentities()
Expand All @@ -32,7 +38,7 @@ public function getIdentities()
}

/**
* @return int
* @inheritDoc
*/
public function getSourceId()
{
Expand Down Expand Up @@ -112,9 +118,7 @@ public function getCreatedAt()
}

/**
* {@inheritdoc}
*
* @return \Magento\ImportService\Api\Data\SourceExtensionInterface|null
* @inheritdoc
*/
public function getExtensionAttributes()
{
Expand All @@ -123,11 +127,8 @@ public function getExtensionAttributes()

/**
* {@inheritdoc}
*
* @param \Magento\ImportService\Api\Data\SourceExtensionInterface $extensionAttributes
* @return $this
*/
public function setExtensionAttributes(\Magento\ImportService\Api\Data\SourceExtensionInterface $extensionAttributes)
public function setExtensionAttributes(SourceExtensionInterface $extensionAttributes)
{
return $this->_setExtensionAttributes($extensionAttributes);
}
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/ImportService/Model/SourceRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function __construct(

/**
* @inheritdoc
*
* @throws CouldNotSaveException
*/
public function save(SourceInterface $source)
Expand All @@ -80,6 +81,7 @@ public function save(SourceInterface $source)

/**
* @inheritdoc
*
* @throws NoSuchEntityException
*/
public function getById($id)
Expand All @@ -95,6 +97,7 @@ public function getById($id)

/**
* @inheritdoc
*
* @throws CouldNotDeleteException
*/
public function delete(SourceInterface $source)
Expand All @@ -111,6 +114,7 @@ public function delete(SourceInterface $source)

/**
* @inheritdoc
*
* @throws CouldNotDeleteException
* @throws NoSuchEntityException
*/
Expand Down

0 comments on commit fb20539

Please sign in to comment.