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

UpdateMyselfRule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
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\rules;
14
15
use rhosocial\user\User;
16
use yii\rbac\Rule;
17
/**
18
 * @version 1.0
19
 * @author vistart <[email protected]>
20
 */
21
class UpdateMyselfRule extends Rule
22
{
23
    public $name = 'canUpdateMyself';
24
    
25
    /**
26
     * Executes the rule.
27
     *
28
     * @param string|User $user the user GUID. This should be either a GUID string representing
29
     * the unique identifier of a user or a User instance. See [[\rhosocial\user\User::guid]].
30
     * @param Item $item the role or permission that this rule is associated with
31
     * @param array $params parameters passed to [[CheckAccessInterface::checkAccess()]].
32
     * @return bool a value indicating whether the rule permits the auth item it is associated with.
33
     */
34 2
    public function execute($user, $item, $params) {
35 2
        return true;
36
    }
37
}
38