Completed
Push — devel ( 4ef29d...480836 )
by Philippe
05:19 queued 02:10
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 7 1
1
<?php
2
/**
3
 * User.php
4
 *
5
 * PHP version 5.6+
6
 *
7
 * @author pgaultier
8
 * @copyright 2010-2016 Ibitux
9
 * @license http://www.ibitux.com/license license
10
 * @version XXX
11
 * @link http://www.ibitux.com
12
 * @package sweelix\oauth2\server\forms
13
 */
14
15
namespace sweelix\oauth2\server\forms;
16
17
use yii\base\Model;
18
19
/**
20
 * Basic user form
21
 *
22
 * @author pgaultier
23
 * @copyright 2010-2016 Ibitux
24
 * @license http://www.ibitux.com/license license
25
 * @version XXX
26
 * @link http://www.ibitux.com
27
 * @package sweelix\oauth2\server\forms
28
 * @since XXX
29
 */
30
class User extends Model
31
{
32
    public $username;
33
    public $password;
34
35
    /**
36
     * @inheritdoc
37
     */
38 4
    public function rules()
39
    {
40
        return [
41 4
            [['username', 'password'], 'string'],
42 4
            [['username', 'password'], 'required'],
43 4
        ];
44
    }
45
}