Completed
Push — master ( 349c2f...e64df6 )
by vistart
03:26
created

DeleteMyself::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 2
eloc 3
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\user\rbac\permissions;
14
15
use rhosocial\user\rbac\rules\DeleteMyselfRule;
16
use rhosocial\user\rbac\Permission;
17
18
/**
19
 * @version 1.0
20
 * @author vistart <[email protected]>
21
 */
22
class DeleteMyself extends Permission
23
{
24
    /**
25
     * @inheritdoc
26
     */
27
    public $name = 'deleteMyself';
28
    
29
    /**
30
     * @inheritdoc
31
     */
32
    public $description = 'Delete myself';
33
    
34 3
    public function init()
35
    {
36 3
        parent::init();
37 3
        $this->ruleName = empty($this->ruleName) ? (new DeleteMyselfRule())->name : $this->ruleName;
38 3
    }
39
}
40