StockValidatorInterface.php 559 B

1234567891011121314151617181920212223242526
  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\InventoryApi\Model;
  8. use Magento\Framework\Validation\ValidationResult;
  9. use Magento\InventoryApi\Api\Data\StockInterface;
  10. /**
  11. * Responsible for Stock validation
  12. * Extension point for base validation
  13. *
  14. * @api
  15. */
  16. interface StockValidatorInterface
  17. {
  18. /**
  19. * @param StockInterface $stock
  20. * @return ValidationResult
  21. */
  22. public function validate(StockInterface $stock): ValidationResult;
  23. }