Passed
Pull Request — master (#7215)
by Angel Fernando Quiroz
19:05 queued 07:41
created

ScimException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatusCode() 0 3 1
A __construct() 0 6 1
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\HttpFoundation\Response;
10
use Throwable;
11
12
class ScimException extends \RuntimeException
13
{
14
    public function __construct(
15
        string $message = "",
16
        private readonly int $statusCode = Response::HTTP_BAD_REQUEST,
17
        ?Throwable $previous = null
18
    ) {
19
        parent::__construct($message, $statusCode, $previous);
20
    }
21
22
    public function getStatusCode(): int
23
    {
24
        return $this->statusCode;
25
    }
26
}
27