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

CreateUserRule::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 3
rs 10
c 1
b 0
f 1
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 3
crap 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
/**
19
 * @version 1.0
20
 * @author vistart <[email protected]>
21
 */
22
class CreateUserRule extends Rule
23
{
24
    public $name = 'canCreateUser';
25
    
26
    /**
27
     * Executes the rule.
28
     *
29
     * @param string|User $user the user GUID. This should be either a GUID string representing
30
     * the unique identifier of a user or a User instance. See [[\rhosocial\user\User::guid]].
31
     * @param Item $item the role or permission that this rule is associated with
32
     * @param array $params parameters passed to [[CheckAccessInterface::checkAccess()]].
33
     * @return bool a value indicating whether the rule permits the auth item it is associated with.
34
     */
35 2
    public function execute($user, $item, $params) {
36 2
        return true;
37
    }
38
}
39