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

RefreshToken::jsonSerialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
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\RefreshTokenGrant;
15
16
use OAuth2Framework\Component\Core\AccessToken\AccessTokenId;
17
use OAuth2Framework\Component\Core\Client\ClientId;
18
use OAuth2Framework\Component\Core\DataBag\DataBag;
19
use OAuth2Framework\Component\Core\ResourceOwner\ResourceOwnerId;
20
use OAuth2Framework\Component\Core\ResourceServer\ResourceServerId;
21
22
interface RefreshToken extends \JsonSerializable
23
{
24
    public function addAccessToken(AccessTokenId $accessTokenId): 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...
25
26
    /**
27
     * @return AccessTokenId[]
28
     */
29
    public function getAccessTokenIds(): iterable;
30
31
    public function getResponseData(): array;
32
33
    public function getId(): RefreshTokenId;
34
35
    public function getExpiresAt(): \DateTimeImmutable;
36
37
    public function hasExpired(): bool;
38
39
    public function getExpiresIn(): int;
40
41
    public function getResourceOwnerId(): ResourceOwnerId;
42
43
    public function getClientId(): ClientId;
44
45
    public function getParameter(): DataBag;
46
47
    public function getMetadata(): DataBag;
48
49
    public function isRevoked(): bool;
50
51
    public function markAsRevoked(): 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...
52
53
    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...
54
}
55