User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A rules() 0 7 1
A attributeLabels() 0 10 1
1
<?php
2
3
namespace App\Models;
4
5
use Micro\Mvc\Models\Model;
6
7
/**
8
 * Class User
9
 * @property string login
10
 * @property string fio
11
 * @property string pass
12
 *
13
 * @package App
14
 * @subpackage Models
15
 */
16
class User extends Model
17
{
18
    /**
19
     * @return string
20
     */
21
    static public function tableName()
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
22
    {
23
        return 'users';
24
    }
25
26
    /**
27
     * @return array
28
     */
29
    public function rules()
30
    {
31
        return [
32
            ['email,login', 'required'],
33
            ['email', 'email']
34
        ];
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function attributeLabels()
41
    {
42
        return [
43
            'email' => 'E-mail',
44
            'login' => 'Логин',
45
            'pass' => 'Пароль',
46
            'fio' => 'ФИО'
47
48
        ];
49
    }
50
}
51