Failed Conditions
Push — master ( aacec5...b5a0b4 )
by Florent
04:50
created

AuthorizationCode::markAsRevoked()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2018 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace OAuth2Framework\Component\AuthorizationCodeGrant;
15
16
use OAuth2Framework\Component\Core\Client\ClientId;
17
use OAuth2Framework\Component\Core\DataBag\DataBag;
18
use OAuth2Framework\Component\Core\ResourceServer\ResourceServerId;
19
use OAuth2Framework\Component\Core\UserAccount\UserAccountId;
20
21
interface AuthorizationCode extends \JsonSerializable
22
{
23
    public function isUsed(): bool;
24
25
    public function markAsUsed(): void;
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
26
27
    public function getQueryParameters(): array;
28
29
    public function getQueryParameter(string $key);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
30
31
    public function hasQueryParameter(string $key): bool;
32
33
    public function getRedirectUri(): string;
34
35
    public function toArray(): array;
36
37
    public function getId(): AuthorizationCodeId;
38
39
    public function getExpiresAt(): \DateTimeImmutable;
40
41
    public function hasExpired(): bool;
42
43
    public function getUserAccountId(): UserAccountId;
44
45
    public function getClientId(): ClientId;
46
47
    public function getParameter(): DataBag;
48
49
    public function getMetadata(): DataBag;
50
51
    public function getResourceServerId(): ?ResourceServerId;
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
52
53
    public function getExpiresIn(): int;
54
}
55