* @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\Core\Domain\Cart\Exception; use Throwable; /** * Thrown when minimal product */ class MinimalQuantityException extends CartException { /** * @var int */ protected $minimalQuantity; /** * @param string $message * @param int $minimalQuantity * @param int $code * @param Throwable|null $previous */ public function __construct(string $message, int $minimalQuantity, int $code = 0, Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->minimalQuantity = $minimalQuantity; } /** * @return int */ public function getMinimalQuantity(): int { return $this->minimalQuantity; } }