Total Complexity | 8 |
Total Lines | 94 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class AuthorizationCode implements AuthorizationCodeInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $code; |
||
17 | /** |
||
18 | * @var string[] |
||
19 | */ |
||
20 | protected $scopes; |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $clientIdentifier; |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $resourceOwnerIdentifier; |
||
29 | /** |
||
30 | * @var string[]|null |
||
31 | */ |
||
32 | protected $requestedScopes; |
||
33 | /** |
||
34 | * @var string|null |
||
35 | */ |
||
36 | protected $redirectUri; |
||
37 | /** |
||
38 | * @var \DateTimeInterface |
||
39 | */ |
||
40 | protected $expiresAt; |
||
41 | |||
42 | public function __construct(string $code, string $scopes, string $clientIdentifier, string $resourceOwnerIdentifier, |
||
43 | int $expiresAt, ?array $requestedScopes = null, ?string $redirectUri = null) |
||
44 | { |
||
45 | $this->code = $code; |
||
46 | $this->scopes = $scopes; |
||
|
|||
47 | $this->clientIdentifier = $clientIdentifier; |
||
48 | $this->resourceOwnerIdentifier = $resourceOwnerIdentifier; |
||
49 | $this->expiresAt = $expiresAt; |
||
50 | $this->requestedScopes = $requestedScopes; |
||
51 | $this->redirectUri = $redirectUri; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getCode(): string |
||
58 | { |
||
59 | return $this->code; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getScopes(): array |
||
66 | { |
||
67 | return $this->scopes; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getClientIdentifier(): string |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getResourceOwnerIdentifier(): string |
||
82 | { |
||
83 | return $this->resourceOwnerIdentifier; |
||
84 | } |
||
85 | |||
86 | public function getExpiresAt(): \DateTimeInterface |
||
87 | { |
||
88 | return $this->expiresAt; |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * @return null|string[] |
||
93 | */ |
||
94 | public function getRequestedScopes(): ?array |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * @return null|string |
||
101 | */ |
||
102 | public function getRedirectUri(): ?string |
||
105 | } |
||
106 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..