Passed
Pull Request — master (#319)
by Anton
12:16 queued 05:08
created

Row::beforeUpdate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
c 0
b 0
f 0
cc 1
crap 2
rs 10
1
<?php
2
/**
3
 * @copyright Bluz PHP Team
4
 * @link      https://github.com/bluzphp/skeleton
5
 */
6
7
declare(strict_types=1);
8
9
namespace Application\Auth;
10
11
use Bluz\Auth\Model\AbstractRow;
12
13
/**
14
 * Auth Row
15
 *
16
 * @package  Application\Auth
17
 *
18
 * @property string $created
19
 * @property string $updated
20
 */
21
class Row extends AbstractRow
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 1
    public function beforeInsert(): void
27
    {
28 1
        $this->created = gmdate('Y-m-d H:i:s');
29 1
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function beforeUpdate(): void
35
    {
36
        $this->updated = gmdate('Y-m-d H:i:s');
37
    }
38
}
39