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

Row::beforeInsert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
crap 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