Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszMesek committed May 10, 2022
1 parent 6ebbc0c commit 61be0d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Command/GetDocumentData.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Model\Product;
use MateuszMesek\DocumentDataApi\Command\GetDocumentDataInterface;
use MateuszMesek\DocumentDataApi\Data\DocumentDataInterface;
use MateuszMesek\DocumentDataCatalogProduct\Data\InputFactory;

class GetDocumentData
Expand All @@ -21,7 +22,7 @@ public function __construct(
$this->getDocumentData = $getDocumentData;
}

public function execute(ProductInterface $product)
public function execute(ProductInterface $product): ?DocumentDataInterface
{
$input = $this->inputFactory->create(['product' => $product]);

Expand Down
3 changes: 2 additions & 1 deletion src/Command/GetDocumentDataByProductIdAndStoreId.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Magento\Catalog\Model\ProductFactory;
use Magento\Catalog\Model\ResourceModel\Product as ProductResource;
use MateuszMesek\DocumentDataApi\Data\DocumentDataInterface;

class GetDocumentDataByProductIdAndStoreId
{
Expand All @@ -22,7 +23,7 @@ public function __construct(
$this->getDocumentData = $getDocumentData;
}

public function execute(int $productId, int $storeId): array
public function execute(int $productId, int $storeId): ?DocumentDataInterface
{
$product = $this->productFactory->create();
$product->setStoreId($storeId);
Expand Down

0 comments on commit 61be0d2

Please sign in to comment.