mirror of
https://github.com/wearepixel/laravel-cart.git
synced 2026-11-14 13:51:44 +00:00
feat: add CartConditionable interface and first-class exceptions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Wearepixel\Cart\Contracts;
|
||||
|
||||
use Wearepixel\Cart\CartCondition;
|
||||
|
||||
interface CartConditionable
|
||||
{
|
||||
public function toCondition(): CartCondition;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Wearepixel\Cart\Exceptions;
|
||||
|
||||
class InvalidCouponException extends \Exception {}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Wearepixel\Cart\Exceptions;
|
||||
|
||||
class InvalidShippingRateException extends \Exception {}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Wearepixel\Cart\Exceptions;
|
||||
|
||||
class InvalidTaxRuleException extends \Exception {}
|
||||
Reference in New Issue
Block a user