Completed
Branch feature/currentUserRefactoring (c13c1d)
by Schlaefer
04:13
created

Role::type()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace Saito\User\Permission\Identifier;
14
15
class Role implements IdentifierInterface
16
{
17
    protected $type = 'role';
18
19
    protected $token;
20
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function __construct($token)
25
    {
26
        $this->token = $token;
27
    }
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function get()
33
    {
34
        return $this->token;
35
    }
36
37
    /**
38
     * {@inheritDoc}
39
     */
40
    public function type(): string
41
    {
42
        return $this->type;
43
    }
44
}
45