1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @author Alex Bilbie <[email protected]> |
||
5 | * @copyright Copyright (c) Alex Bilbie |
||
6 | * @license http://mit-license.org/ |
||
7 | * |
||
8 | * @link https://github.com/thephpleague/oauth2-server |
||
9 | */ |
||
10 | |||
11 | declare(strict_types=1); |
||
12 | |||
13 | namespace League\OAuth2\Server\Entities\Traits; |
||
14 | |||
15 | trait ClientTrait |
||
16 | { |
||
17 | protected string $name; |
||
18 | |||
19 | /** |
||
20 | * @var string|string[] |
||
21 | */ |
||
22 | protected string|array $redirectUri; |
||
23 | |||
24 | protected bool $isConfidential = false; |
||
25 | |||
26 | /** |
||
27 | * Get the client's name. |
||
28 | * |
||
29 | * |
||
30 | * @codeCoverageIgnore |
||
31 | */ |
||
32 | public function getName(): string |
||
33 | { |
||
34 | return $this->name; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Returns the registered redirect URI (as a string). Alternatively return |
||
39 | * an indexed array of redirect URIs. |
||
40 | * |
||
41 | * @return string|string[] |
||
42 | */ |
||
43 | 31 | public function getRedirectUri(): string|array |
|
44 | { |
||
45 | 31 | return $this->redirectUri; |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Returns true if the client is confidential. |
||
50 | */ |
||
51 | 60 | public function isConfidential(): bool |
|
52 | { |
||
53 | 60 | return $this->isConfidential; |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * Returns true if the client supports the given grant type. |
||
58 | */ |
||
59 | 81 | public function supportsGrantType(string $grantType): bool |
|
0 ignored issues
–
show
|
|||
60 | { |
||
61 | 81 | return true; |
|
62 | } |
||
63 | } |
||
64 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.