* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Adapter\Product\Stock\QueryHandler; use PrestaShop\PrestaShop\Core\Domain\Product\Stock\Query\GetCombinationStockMovements; use PrestaShop\PrestaShop\Core\Domain\Product\Stock\QueryHandler\GetCombinationStockMovementsHandlerInterface; /** * Handles @see GetCombinationStockMovements using the adapter repositories. */ class GetCombinationStockMovementsHandler extends AbstractGetStockMovementsHandler implements GetCombinationStockMovementsHandlerInterface { /** * {@inheritDoc} */ public function handle(GetCombinationStockMovements $query): array { return $this->getStockMovements( $this->stockAvailableRepository->getStockIdByCombination( $query->getCombinationId(), $query->getShopId() ), $query->getOffset(), $query->getLimit() ); } }