Settings::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Spoon plugin for Craft CMS 3.x
4
 *
5
 * Enhance Matrix
6
 *
7
 * @link      https://angell.io
8
 * @copyright Copyright (c) 2018 Angell & Co
9
 */
10
11
namespace angellco\spoon\models;
12
13
use angellco\spoon\Spoon;
14
15
use Craft;
16
use craft\base\Model;
17
use craft\validators\ArrayValidator;
18
19
/**
20
 * Settings Model
21
 *
22
 * @author    Angell & Co
23
 * @package   Spoon
24
 * @since     3.0.0
25
 */
26
class Settings extends Model
27
{
28
29
    // Public Properties
30
    // =========================================================================
31
32
    /**
33
     * An array of Matrix field handles that should use the nested settings menu
34
     * display mode
35
     *
36
     * @var array
37
     */
38
    public $nestedSettings = [];
39
40
    // Public Methods
41
    // =========================================================================
42
43
    /**
44
     * @inheritdoc
45
     */
46
    public function rules()
47
    {
48
        return [
49
            ['nestedSettings', ArrayValidator::class]
50
        ];
51
    }
52
53
}