CasException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCasCode() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\casserver\Cas;
6
7
use Exception;
8
9
/**
10
 * CasException correspond to different cas error codes
11
 * @package SimpleSAML\Module\casserver\Cas
12
 */
13
class CasException extends Exception
14
{
15
    /** @var string */
16
    private string $casCode;
17
18
    /**
19
     * CasException constructor.
20
     * @param string $casCode
21
     * @param string $message
22
     */
23
    public function __construct(string $casCode, string $message)
24
    {
25
        parent::__construct($message);
26
        $this->casCode = $casCode;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getCasCode(): string
33
    {
34
        return $this->casCode;
35
    }
36
}
37