Completed
Push — master ( 04ac75...81967b )
by Nate
17:06
created

TokenEnvironment::getProvider()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 0
cts 14
cp 0
rs 9.7333
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/patron/license
6
 * @link       https://www.flipboxfactory.com/software/patron/
7
 */
8
9
namespace flipbox\patron\records;
10
11
use flipbox\ember\records\ActiveRecord;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.0.0
16
 */
17
class TokenEnvironment extends ActiveRecord
18
{
19
    use traits\EnvironmentAttribute,
20
        traits\TokenAttribute;
21
22
    /**
23
     * The table alias
24
     */
25
    const TABLE_ALIAS = 'patron_token_environments';
26
27
    /**
28
     * @inheritdoc
29
     */
30
    protected $getterPriorityAttributes = [
31
        'tokenId'
32
    ];
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function rules()
38
    {
39
        return array_merge(
40
            parent::rules(),
41
            $this->environmentRules(),
42
            $this->tokenRules(),
43
            [
44
                [
45
                    [
46
                        'tokenId'
47
                    ],
48
                    'required'
49
                ]
50
            ]
51
        );
52
    }
53
}
54