Completed
Push — master ( ca3e5a...8325fc )
by vistart
04:16
created

SetUpOrganization::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
cc 2
eloc 2
nc 2
nop 0
crap 2
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.me/
9
 * @copyright Copyright (c) 2016 - 2017 vistart
10
 * @license https://vistart.me/license/
11
 */
12
13
namespace rhosocial\organization\rbac\permissions;
14
15
use rhosocial\user\rbac\Permission;
16
use rhosocial\organization\rbac\rules\SetUpOrganizationRule;
17
18
/**
19
 * This class described a `setUpOrganization` permission, which allows user
20
 * who had it to set up an organization.
21
 * This permission will not be assigned to anyone by default.
22
 *
23
 * @version 1.0
24
 * @author vistart <[email protected]>
25
 */
26
class SetUpOrganization extends Permission
27
{
28
    /**
29
     * @inheritdoc
30
     */
31
    public $name = 'setUpOrganization';
32
    
33
    /**
34
     * @inheritdoc
35
     */
36
    public $description = 'Set up an organization.';
37
38 37
    public function init()
39
    {
40 37
        $this->ruleName = empty($this->ruleName) ? (new SetUpOrganizationRule)->name : $this->ruleName;
41 37
    }
42
}
43