Settings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 12
c 4
b 0
f 0
dl 0
loc 78
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 4 1
1
<?php
2
namespace dukt\facebook\models;
3
4
use craft\base\Model;
5
6
/**
7
 * Settings model class.
8
 *
9
 * @author Dukt <[email protected]>
10
 * @since  2.0
11
 */
12
class Settings extends Model
13
{
14
    // Properties
15
    // =========================================================================
16
    /**
17
     * Graph API version used to request the Facebook API.
18
     *
19
     * @var string
20
     */
21
    public $apiVersion = 'v8.0';
22
23
    /**
24
     * The amount of time cache should last.
25
     *
26
     * @see http://www.php.net/manual/en/dateinterval.construct.php
27
     *
28
     * @var string
29
     */
30
    public $cacheDuration = 'PT1H';
31
32
    /**
33
     * Whether request to APIs should be cached or not.
34
     *
35
     * @var bool
36
     */
37
    public $enableCache = true;
38
39
    /**
40
     * OAuth client ID.
41
     *
42
     * @var string|null
43
     */
44
    public $oauthClientId;
45
46
    /**
47
     * OAuth client secret.
48
     *
49
     * @var string|null
50
     */
51
    public $oauthClientSecret;
52
53
    /**
54
     * OAuth provider authorization options.
55
     *
56
     * @var array
57
     */
58
    public $oauthAuthorizationOptions = [];
59
60
    /**
61
     * OAuth scope.
62
     *
63
     * @var array
64
     */
65
    public $oauthScope = ['public_profile', 'pages_read_engagement', 'read_insights'];
66
67
    /**
68
     * @var mixed|null The OAuth token
69
     * @deprecated in 2.1.5
70
     */
71
    public $token;
72
73
    /**
74
     * Facebook Insights Object ID
75
     *
76
     * @var string|null
77
     */
78
    public $facebookInsightsObjectId;
79
80
    // Public Methods
81
    // =========================================================================
82
83
    /**
84
     * @return array
85
     */
86
    public function rules()
87
    {
88
        return [
89
            [['facebookInsightsObjectId'], 'string'],
90
        ];
91
    }
92
}
93