DateJoinedAttributeTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
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 29
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A dateJoinedAttributes() 0 6 1
A dateJoinedAttributeLabels() 0 6 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/organization/license
6
 * @link       https://www.flipboxfactory.com/software/organization/
7
 */
8
9
namespace flipbox\organizations\models;
10
11
use Craft;
12
use DateTime;
13
use flipbox\organizations\objects\DateJoinedMutatorTrait;
14
15
/**
16
 * @property DateTime|null $dateJoined
17
 *
18
 * @author Flipbox Factory <[email protected]>
19
 * @since 1.0.0
20
 */
21
trait DateJoinedAttributeTrait
22
{
23
    use DateJoinedRulesTrait, DateJoinedMutatorTrait;
24
25
    /**
26
     * @var DateTime|null
27
     */
28
    private $dateJoined;
29
30
    /**
31
     * @return array
32
     */
33
    protected function dateJoinedAttributes(): array
34
    {
35
        return [
36
            'dateJoined'
37
        ];
38
    }
39
40
    /**
41
     * @inheritdoc
42
     */
43
    protected function dateJoinedAttributeLabels()
44
    {
45
        return [
46
            'dateJoined' => Craft::t('organizations', 'Date Joined')
47
        ];
48
    }
49
}
50