OwnerAttribute   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 39
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A ownerFields() 0 6 1
A ownerAttributes() 0 6 1
A ownerAttributeLabels() 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\meta\traits;
10
11
use Craft;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.0.0
16
 */
17
trait OwnerAttribute
18
{
19
    use OwnerRules, OwnerMutator;
20
21
    /**
22
     * @var int|null
23
     */
24
    private $ownerId;
25
26
    /**
27
     * @return array
28
     */
29
    protected function ownerFields(): array
30
    {
31
        return [
32
            'ownerId'
33
        ];
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    protected function ownerAttributes(): array
40
    {
41
        return [
42
            'ownerId'
43
        ];
44
    }
45
46
    /**
47
     * @return array
48
     */
49
    protected function ownerAttributeLabels(): array
50
    {
51
        return [
52
            'ownerId' => Craft::t('meta', 'Owner Id')
53
        ];
54
    }
55
}
56