Passed
Push — trunk ( d8cd01...b6c024 )
by Christian
13:44 queued 12s
created

UnnecessaryTransitionException::getStatusCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\System\StateMachine\Exception;
4
5
use Shopware\Core\Framework\Log\Package;
6
use Shopware\Core\System\StateMachine\StateMachineException;
7
use Symfony\Component\HttpFoundation\Response;
8
9
#[Package('checkout')]
10
class UnnecessaryTransitionException extends StateMachineException
11
{
12
    public function __construct(string $transition)
13
    {
14
        parent::__construct(
15
            Response::HTTP_BAD_REQUEST,
16
            self::UNNECESSARY_TRANSITION,
17
            'The transition "{{ transition }}" is unnecessary, already on desired state.',
18
            ['transition' => $transition]
19
        );
20
    }
21
}
22