Completed
Push — master ( 0d663c...33e019 )
by vistart
03:45 queued 55s
created

UpdateUser::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\UpdateUserRule;
16
use rhosocial\user\rbac\Permission;
17
18
/**
19
 * @version 1.0
20
 * @author vistart <[email protected]>
21
 */
22
class UpdateUser extends Permission
23
{
24
    /**
25
     * @inheritdoc
26
     */
27
    public $name = 'updateUser';
28
    
29
    /**
30
     * @inheritdoc
31
     */
32
    public $description = 'Update a user';
33
34 2
    public function init()
35
    {
36 2
        parent::init();
37 2
        $this->ruleName = empty($this->ruleName) ? (new UpdateUserRule())->name : $this->ruleName;
38 2
    }
39
}
40