Settings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 4 1
1
<?php
2
/**
3
 * @link      https://dukt.net/twitter/
4
 * @copyright Copyright (c) Dukt
5
 * @license   https://github.com/dukt/twitter/blob/master/LICENSE.md
6
 */
7
8
namespace dukt\twitter\models;
9
10
use craft\base\Model;
11
12
/**
13
 * Settings model class.
14
 *
15
 * @author Dukt <[email protected]>
16
 * @since  3.0
17
 */
18
class Settings extends Model
19
{
20
    // Properties
21
    // =========================================================================
22
23
    /**
24
     * @var string The amount of time cache should last
25
     *
26
     * @see http://www.php.net/manual/en/dateinterval.construct.php
27
     */
28
    public $cacheDuration = 'PT10M';
29
30
    /**
31
     * @var bool Whether request to APIs should be cached or not
32
     */
33
    public $enableCache = true;
34
35
    /**
36
     * @var string|null The OAuth token.
37
     * @deprecated in 2.1.5
38
     */
39
    public $token;
40
41
    /**
42
     * @var string|null The OAuth token secret.
43
     * @deprecated in 2.1.5
44
     */
45
    public $tokenSecret;
46
47
    /**
48
     * @var string|null The OAuth consumer key.
49
     */
50
    public $oauthConsumerKey;
51
52
    /**
53
     * @var string|null The OAuth consumer secret.
54
     */
55
    public $oauthConsumerSecret;
56
57
    /**
58
     * @var string|null The search widget’s extra query.
59
     */
60
    public $searchWidgetExtraQuery = '-filter:retweets';
61
62
    // Public Methods
63
    // =========================================================================
64
65
    /**
66
     * @return array
67
     */
68
    public function rules()
69
    {
70
        return [
71
            [['token', 'tokenSecret'], 'string'],
72
        ];
73
    }
74
}
75