Completed
Pull Request — master (#263)
by
unknown
05:02
created

Row::beforeInsert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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
    public function beforeInsert()
33
    {
34
        $this->created = gmdate('Y-m-d H:i:s');
35
    }
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