Group::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
1
<?php
2
3
namespace ThallesDella\GateKeeper\Roles;
4
5
/**
6
 * Gate Keeper | Class Group [ ROLE SYSTEM ]
7
 *
8
 * @category GateKeeper\Roles
9
 * @package  ThallesDella\GateKeeper\Roles
10
 * @author   Thalles D. koester <[email protected]>
11
 * @license  https://choosealicense.com/licenses/mit/ MIT
12
 * @link     https://github.com/thallesdella/gate-keeper
13
 */
14
class Group
15
{
16
    /**
17
     * @var string
18
     */
19
    public $name;
20
    
21
    /**
22
     * @var int
23
     */
24
    public $id;
25
    
26
    /**
27
     * @var string|null
28
     */
29
    public $auth_url;
30
    
31
    /**
32
     * Group constructor.
33
     *
34
     * @param string $groupName
35
     * @param int    $groupId
36
     */
37
    public function __construct(string $groupName, int $groupId)
38
    {
39
        $this->name = $groupName;
40
        $this->id = $groupId;
41
        $this->auth_url = null;
42
    }
43
    
44
    /**
45
     * @param string|null $auth_url
46
     */
47
    public function setAuthUrl(?string $auth_url = null): void
48
    {
49
        $this->auth_url = $auth_url;
50
    }
51
}