Passed
Push — trunk ( e136f9...a572a3 )
by Christian
13:15 queued 22s
created

UserException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A salesChannelNotFound() 0 6 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\System\User;
4
5
use Shopware\Core\Framework\HttpException;
6
use Shopware\Core\Framework\Log\Package;
7
use Symfony\Component\HttpFoundation\Response;
8
9
#[Package('system-settings')]
10
class UserException extends HttpException
11
{
12
    final public const SALES_CHANNEL_NOT_FOUND = 'USER__SALES_CHANNEL_NOT_FOUND';
13
14
    public static function salesChannelNotFound(): HttpException
15
    {
16
        return new self(
17
            Response::HTTP_PRECONDITION_FAILED,
18
            self::SALES_CHANNEL_NOT_FOUND,
19
            'No sales channel found.',
20
        );
21
    }
22
}
23