UidRulesTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 20
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A uidRules() 0 14 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 yii\base\Model;
12
13
/**
14
 * @property string|null $uid
15
 *
16
 * @author Flipbox Factory <[email protected]>
17
 * @since 2.0.0
18
 */
19
trait UidRulesTrait
20
{
21
    /**
22
     * @inheritdoc
23
     */
24
    public function uidRules()
25
    {
26
        return [
27
            [
28
                [
29
                    'uid'
30
                ],
31
                'safe',
32
                'on' => [
33
                    Model::SCENARIO_DEFAULT
34
                ]
35
            ]
36
        ];
37
    }
38
}
39