Passed
Push — trunk ( ee04ee...d8d59f )
by Christian
13:00 queued 13s
created

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
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Content\Flow\Exception;
4
5
use Shopware\Core\Framework\Log\Package;
6
use Shopware\Core\Framework\ShopwareHttpException;
7
use Symfony\Component\HttpFoundation\Response;
8
9
/**
10
 * @internal
11
 */
12
#[Package('business-ops')]
13
class CustomTriggerByNameNotFoundException extends ShopwareHttpException
14
{
15
    public function __construct(string $eventName)
16
    {
17
        parent::__construct(
18
            'The provided event name {{ eventName }} is invalid or uninstalled and no custom trigger could be found.',
19
            ['eventName' => $eventName]
20
        );
21
    }
22
23
    public function getErrorCode(): string
24
    {
25
        return 'ADMINISTRATION__CUSTOM_TRIGGER_BY_NAME_NOT_FOUND';
26
    }
27
28
    public function getStatusCode(): int
29
    {
30
        return Response::HTTP_NOT_FOUND;
31
    }
32
}
33