GuestRule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 13
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
1
<?php
2
3
namespace toir427\admin\components;
4
5
use yii\rbac\Rule;
6
7
/**
8
 * Description of GuestRule
9
 *
10
 * @author Misbahul D Munir <[email protected]>
11
 * @since 2.5
12
 */
13
class GuestRule extends Rule
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public $name = 'guest_rule';
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function execute($user, $item, $params)
24
    {
25
        return $user->getIsGuest();
26
    }
27
}
28