AuthorizationServerException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 4
crap 2
1
<?php
2
3
namespace Phisch\OAuth\Server\Exception;
4
5
use Exception;
6
7
class AuthorizationServerException extends \Exception
8
{
9
    /**
10
     * @var string
11
     */
12
    private $errorCode;
13
14
    /**
15
     * @param string $message
16
     * @param int $code
17
     * @param Exception $previous
18
     * @param string $errorCode
19
     */
20
    public function __construct($message = "", $code = 0, Exception $previous = null, $errorCode = "")
21
    {
22
        $this->errorCode = $errorCode;
23
24
        parent::__construct($message, $code, $previous);
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getErrorCode()
31
    {
32
        return $this->errorCode;
33
    }
34
}
35