User::findIdentityByAccessToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace yii2mod\rbac\tests\data;
4
5
use yii\db\ActiveRecord;
6
use yii\web\IdentityInterface;
7
8
/**
9
 * @property int $id
10
 * @property string $username
11
 * @property string $email
12
 */
13
class User extends ActiveRecord implements IdentityInterface
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public static function tableName()
19
    {
20
        return 'user';
21
    }
22
23
    /**
24
     * @inheritdoc
25
     */
26
    public function rules()
27
    {
28
        return [
29
            [['username', 'email'], 'required'],
30
        ];
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    public static function findIdentity($id)
37
    {
38
        return static::findOne($id);
39
    }
40
41
    /**
42
     * @inheritdoc
43
     */
44
    public static function findIdentityByAccessToken($token, $type = null)
45
    {
46
        // TODO: Implement findIdentityByAccessToken() method.
47
    }
48
49
    /**
50
     * @inheritdoc
51
     */
52
    public function getId()
53
    {
54
        return $this->getPrimaryKey();
55
    }
56
57
    /**
58
     * @inheritdoc
59
     */
60
    public function getAuthKey()
61
    {
62
        // TODO: Implement getAuthKey() method.
63
    }
64
65
    /**
66
     * @inheritdoc
67
     */
68
    public function validateAuthKey($authKey)
69
    {
70
        // TODO: Implement validateAuthKey() method.
71
    }
72
}
73