Completed
Pull Request — master (#558)
by
unknown
35:44
created

ClientTrait::setRedirectUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * @author      Alex Bilbie <[email protected]>
4
 * @copyright   Copyright (c) Alex Bilbie
5
 * @license     http://mit-license.org/
6
 *
7
 * @link        https://github.com/thephpleague/oauth2-server
8
 */
9
10
namespace League\OAuth2\Server\Entities\Traits;
11
12
trait ClientTrait
13
{
14
    /**
15
     * @var null|string
16
     */
17
    protected $name;
18
19
    /**
20
     * @var null|string|string[]
21
     */
22
    protected $redirectUri;
23
24
    /**
25
     * Get the client's name.
26
     *
27
     * @return string
28
     * @codeCoverageIgnore
29
     */
30
    public function getName()
31
    {
32
        return $this->name;
33
    }
34
35
    /**
36
     * Set the client's name.
37
     *
38
     * @param string $name
39
     */
40
    public function setName($name)
41
    {
42
        $this->name = $name;
43
    }
44
45
    /**
46
     * Returns the registered redirect URI (as a string).
47
     *
48
     * Alternatively return an indexed array of redirect URIs.
49
     *
50
     * @return string|string[]
51
     */
52
    public function getRedirectUri()
53
    {
54
        return $this->redirectUri;
55
    }
56
57
    /**
58
     * Sets the registered redirect URI (as a string).
59
     *
60
     * Alternatively set an indexed array of redirect URIs.
61
     *
62
     * @param string|string[] $uri
63
     */
64
    public function setRedirectUri($uri)
65
    {
66
        $this->redirectUri = $uri;
67
    }
68
}
69