Failed Conditions
Push — master ( 9eeb29...881d26 )
by Florent
16:44
created

Client::setOwnerId()   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 1
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\Core\Client;
15
16
use OAuth2Framework\Component\Core\DataBag\DataBag;
17
use OAuth2Framework\Component\Core\ResourceOwner\ResourceOwner;
18
use OAuth2Framework\Component\Core\ResourceOwner\ResourceOwnerId;
19
use OAuth2Framework\Component\Core\UserAccount\UserAccountId;
20
21
/**
22
 * This interface is used for every client types.
23
 * A client is a resource owner with a set of allowed grant types and can perform requests against
24
 * available endpoints.
25
 */
26
interface Client extends ResourceOwner, \JsonSerializable
27
{
28
    public function getClientId(): ClientId;
29
30
    public function getOwnerId(): ?UserAccountId;
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...
31
32
    public function setParameter(DataBag $parameter): 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...
33
34
    public function markAsDeleted(): 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...
35
36
    public function isDeleted(): bool;
37
38
    public function isGrantTypeAllowed(string $grant_type): bool;
39
40
    public function isResponseTypeAllowed(string $response_type): bool;
41
42
    public function isPublic(): bool;
43
44
    public function getTokenEndpointAuthenticationMethod(): string;
45
46
    public function getClientCredentialsExpiresAt(): int;
47
48
    public function areClientCredentialsExpired(): bool;
49
50
    public function getPublicId(): ResourceOwnerId;
51
52
    public function has(string $key): bool;
53
54
    /**
55
     * @return mixed|null
56
     */
57
    public function get(string $key);
58
59
    public function all(): array;
60
}
61