Passed
Push — trunk ( 2ef630...41af6c )
by Christian
10:02 queued 15s
created

InactiveCustomerException::getStatusCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Checkout\Customer\Exception;
4
5
use Shopware\Core\Framework\Log\Package;
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * @deprecated tag:v6.6.0 - reason:remove-exception - Will be removed without replacement, not in use any more. Use `BadCredentialsException` or `CustomerOptinNotCompletedException` instead
10
 */
11
#[Package('customer-order')]
12
class InactiveCustomerException extends CustomerOptinNotCompletedException
13
{
14
    public function __construct(string $id)
15
    {
16
        parent::__construct(
0 ignored issues
show
Deprecated Code introduced by
The function Shopware\Core\Checkout\C...xception::__construct() has been deprecated: tag:v6.6.0 the $message parameter will be removed without replacement ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

16
        /** @scrutinizer ignore-deprecated */ parent::__construct(

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
17
            $id,
18
            'The customer with the id "{{ customerId }}" is inactive.',
19
            Response::HTTP_UNAUTHORIZED,
20
            self::CUSTOMER_IS_INACTIVE,
21
        );
22
    }
23
24
    public function getSnippetKey(): string
25
    {
26
        return 'account.inactiveAccountAlert';
27
    }
28
}
29