ProductSalability.php 638 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\ProductAlert\Model;
  8. use Magento\Catalog\Api\Data\ProductInterface;
  9. use Magento\Store\Api\Data\WebsiteInterface;
  10. /**
  11. * Checks product salability
  12. */
  13. class ProductSalability
  14. {
  15. /**
  16. * @param ProductInterface $product
  17. * @param WebsiteInterface $website
  18. * @return bool
  19. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  20. */
  21. public function isSalable(ProductInterface $product, WebsiteInterface $website): bool
  22. {
  23. return $product->isSalable();
  24. }
  25. }