DateUpdatedAttributeTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 24
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A dateUpdatedAttributes() 0 6 1
A dateUpdatedAttributeLabels() 0 6 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipboxfactory/craft-ember/blob/master/LICENSE
6
 * @link       https://github.com/flipboxfactory/craft-ember/
7
 */
8
9
namespace flipbox\craft\ember\models;
10
11
use Craft;
12
use DateTime;
13
14
/**
15
 * @property DateTime|null $dateUpdated
16
 *
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 2.0.0
19
 */
20
trait DateUpdatedAttributeTrait
21
{
22
    use DateUpdatedRulesTrait, \flipbox\craft\ember\objects\DateUpdatedAttributeTrait;
23
24
    /**
25
     * @return array
26
     */
27
    protected function dateUpdatedAttributes(): array
28
    {
29
        return [
30
            'dateUpdated'
31
        ];
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function dateUpdatedAttributeLabels(): array
38
    {
39
        return [
40
            'dateUpdated' => Craft::t('app', 'Date Updated')
41
        ];
42
    }
43
}
44