Completed
Push — master ( d61ccd...74eea6 )
by Alexandre
03:47
created

InvalidAuthorizationRequest::getOauthException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 25/05/2018
6
 * Time: 23:44
7
 */
8
9
namespace OAuth2\Exceptions;
10
11
12
use OAuth2\ResponseModes\ResponseModeInterface;
13
use Psr\Http\Message\UriInterface;
14
15
class InvalidAuthorizationRequest extends \Exception
16
{
17
    /**
18
     * @var OAuthException
19
     */
20
    private $oauthException;
21
    /**
22
     * @var UriInterface
23
     */
24
    private $redirectUri;
25
    /**
26
     * @var ResponseModeInterface
27
     */
28
    private $responseMode;
29
    /**
30
     * @var null|string
31
     */
32
    private $state;
33
34
    public function __construct(OAuthException $oauthException,
35
                                UriInterface $redirectUri,
36
                                ResponseModeInterface $responseMode,
37
                                ?string $state)
38
    {
39
        $this->oauthException = $oauthException;
40
        $this->redirectUri = $redirectUri;
41
        $this->responseMode = $responseMode;
42
        $this->state = $state;
43
    }
44
45
    /**
46
     * @return OAuthException
47
     */
48
    public function getOauthException(): OAuthException
49
    {
50
        return $this->oauthException;
51
    }
52
53
    /**
54
     * @return UriInterface
55
     */
56
    public function getRedirectUri(): UriInterface
57
    {
58
        return $this->redirectUri;
59
    }
60
61
    /**
62
     * @return ResponseModeInterface
63
     */
64
    public function getResponseMode(): ResponseModeInterface
65
    {
66
        return $this->responseMode;
67
    }
68
69
    /**
70
     * @return null|string
71
     */
72
    public function getState(): ?string
73
    {
74
        return $this->state;
75
    }
76
77
78
}