Passed
Push — master ( 70f86d...3c4fa6 )
by
unknown
09:52 queued 01:28
created

NotAllowedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 6
dl 0
loc 10
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
namespace Chamilo\CoreBundle\Exception;
8
9
use Symfony\Component\HttpKernel\Exception\HttpException;
10
use Throwable;
11
12
class NotAllowedException extends HttpException
13
{
14
    private string $severity;
15
16
    public function __construct(
17
        string $message = 'Not allowed',
18
        string $severity = 'warning',
19
        int $statusCode = 403,
20
        array $headers = [],
21
        int $code = 0,
22
        Throwable $previous = null
23
    ) {
24
        $this->severity = $severity;
25
        parent::__construct($statusCode, $message, $previous, $headers, $code);
26
    }
27
28
    public function getSeverity(): string
29
    {
30
        return $this->severity;
31
    }
32
}
33