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

ResourceOwner::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 0
cts 3
cp 0
crap 2
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
}