Completed
Push — master ( 6e52f0...d9a404 )
by Alexandre
02:29
created

ResourceOwner   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setAuthenticated() 0 3 1
A isAuthenticated() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 30/12/2017
6
 * Time: 16:42
7
 */
8
9
namespace OAuth2OLD\Role;
10
11
12
/**
13
 * Class ResourceOwner
14
 * @package OAuth2\roles
15
 *
16
 * @see https://tools.ietf.org/html/rfc6749#section-1.1
17
 *
18
 * Roles
19
 *
20
 *     An entity capable of granting access to a protected resource.
21
 * When the resource owner is a person, it is referred to as an
22
 * end-user.
23
 */
24
class ResourceOwner
25
{
26
    /**
27
     * @var bool
28
     */
29
    protected $authenticated = false;
30
31
    public function __construct(bool $authenticated = false)
32
    {
33
        $this->authenticated = $authenticated;
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function isAuthenticated(): bool
40
    {
41
        return $this->authenticated;
42
    }
43
44
    /**
45
     * @param bool $authenticated
46
     */
47
    public function setAuthenticated(bool $authenticated): void
48
    {
49
        $this->authenticated = $authenticated;
50
    }
51
}