Completed
Push — master ( 53b75a...71c7f7 )
by vistart
04:49
created

UserRule::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 3
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 rhosocial\user\rbac\roles\UserRole;
17
use yii\rbac\Rule;
18
19
class UserRule extends Rule
20
{
21
    /**
22
     * Executes the rule.
23
     *
24
     * @param string|User $user the user GUID. This should be either a GUID string representing
25
     * the unique identifier of a user or a User instance. See [[\rhosocial\user\User::guid]].
26
     * @param UserRole $item the role or permission that this rule is associated with
27
     * @param array $params parameters passed to [[CheckAccessInterface::checkAccess()]].
28
     * @return bool a value indicating whether the rule permits the auth item it is associated with.
29
     */
30
    public function execute($user, $item, $params) {
31
        return true;
32
    }
33
}
34