| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | class OrderInconsistentException extends ShopwareHttpException |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $orderId; |
||
| 14 | |||
| 15 | public function __construct(string $orderId, string $reason) |
||
| 16 | { |
||
| 17 | parent::__construct( |
||
| 18 | 'Inconsistent order with id "{{ orderId }}". Reason: {{ reason }}', |
||
| 19 | ['orderId' => $orderId, 'reason' => $reason] |
||
| 20 | ); |
||
| 21 | |||
| 22 | $this->orderId = $orderId; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getErrorCode(): string |
||
| 26 | { |
||
| 27 | return 'CHECKOUT__ORDER_INCONSISTENT'; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getStatusCode(): int |
||
| 31 | { |
||
| 32 | return Response::HTTP_BAD_REQUEST; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getOrderId(): string |
||
| 38 | } |
||
| 39 | } |
||
| 40 |