Completed
Push — master ( 075767...680728 )
by Anton
05:11 queued 05:08
created

Row   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
ccs 3
cts 5
cp 0.6
c 0
b 0
f 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A beforeUpdate() 0 3 1
A beforeInsert() 0 3 1
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