RevokeOrganization   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 17
rs 10
ccs 3
cts 3
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 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\RevokeOrganizationRule;
17
18
/**
19
 * This class described a `RevokeOrganization` permission, which allows user
20
 * who had it to revoke an organization.
21
 * This permission will be automatically assigned to creator of organization.
22
 *
23
 * @version 1.0
24
 * @author vistart <[email protected]>
25
 */
26
class RevokeOrganization extends Permission
27
{
28
    /**
29
     * @inheritdoc
30
     */
31
    public $name = 'revokeOrganization';
32
    
33
    /**
34
     * @inheritdoc
35
     */
36
    public $description = 'Revoke organization.';
37
38 12
    public function init()
39
    {
40 12
        $this->ruleName = empty($this->ruleName) ? (new RevokeOrganizationRule)->name : $this->ruleName;
41 12
    }
42
}
43