Passed
Push — master ( 9e6441...cfa3d6 )
by Christian
14:05
created

GuestNotAuthenticatedException::getStatusCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Checkout\Order\Exception;
4
5
use Shopware\Core\Framework\ShopwareHttpException;
6
use Symfony\Component\HttpFoundation\Response;
7
8
class GuestNotAuthenticatedException extends ShopwareHttpException
9
{
10
    public function __construct()
11
    {
12
        parent::__construct('Guest not authenticated.');
13
    }
14
15
    public function getErrorCode(): string
16
    {
17
        return 'CHECKOUT__GUEST_NOT_AUTHENTICATED';
18
    }
19
20
    public function getStatusCode(): int
21
    {
22
        return Response::HTTP_FORBIDDEN;
23
    }
24
}
25