Contact   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 17
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 11 1
1
<?php
2
/**
3
 * HIAM module for MRDP database compatibility
4
 *
5
 * @link      https://github.com/hiqdev/hiam-mrdp
6
 * @package   hiam-mrdp
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiam\mrdp\storage;
12
13
/**
14
 * Contact model.
15
 *
16
 * @property integer $obj_id PK
17
 * @property string  $first_name
18
 * @property string  $last_name
19
 * @property string  $email
20
 */
21
class Contact extends \yii\db\ActiveRecord
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function rules()
27
    {
28
        return [
29
            [['first_name', 'last_name'], 'trim'],
30
            [['first_name', 'last_name'], 'string', 'min' => 2, 'max' => 64],
31
32
            ['email', 'trim'],
33
            ['email', 'filter', 'filter' => 'strtolower'],
34
            ['email', 'email'],
35
        ];
36
    }
37
}
38