Completed
Push — master ( c18000...efec97 )
by Anton
12s
created

Row   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 22
rs 10
ccs 3
cts 6
cp 0.5
wmc 2
lcom 2
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A beforeInsert() 0 4 1
A beforeUpdate() 0 4 1
1
<?php
2
/**
3
 * @copyright Bluz PHP Team
4
 * @link https://github.com/bluzphp/skeleton
5
 */
6
7
/**
8
 * @namespace
9
 */
10
namespace Application\Auth;
11
12
use Bluz\Auth\AbstractRow;
13
14
/**
15
 * Auth Row
16
 *
17
 * @package  Application\Auth
18
 *
19
 * @property string $created
20
 * @property string $updated
21
 *
22
 * @author   Anton Shevchuk
23
 * @created  24.10.12 11:57
24
 */
25
class Row extends AbstractRow
26
{
27
    /**
28
     * __insert
29
     *
30
     * @return void
31
     */
32 1
    public function beforeInsert()
33
    {
34 1
        $this->created = gmdate('Y-m-d H:i:s');
35 1
    }
36
37
    /**
38
     * __update
39
     *
40
     * @return void
41
     */
42
    public function beforeUpdate()
43
    {
44
        $this->updated = gmdate('Y-m-d H:i:s');
45
    }
46
}
47