ClientTrait::getRedirectUri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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 44
    public function getRedirectUri(): string|array
44
    {
45 44
        return $this->redirectUri;
46
    }
47
48
    /**
49
     * Returns true if the client is confidential.
50
     */
51 32
    public function isConfidential(): bool
52
    {
53 32
        return $this->isConfidential;
54
    }
55
}
56