Passed
Branch develop (078eb3)
by Andrew
05:54 queued 03:15
created

Settings::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Connect plugin for Craft CMS 3.x
4
 *
5
 * Allows you to connect to external databases and perform db queries
6
 *
7
 * @link      https://nystudio107.com/
8
 * @copyright Copyright (c) 2018 nystudio107
9
 */
10
11
namespace nystudio107\connect\models;
12
13
use craft\base\Model;
14
use craft\validators\ArrayValidator;
15
16
/**
17
 * @author    nystudio107
18
 * @package   Connect
19
 * @since     1.0.0
20
 */
21
class Settings extends Model
22
{
23
    // Public Properties
24
    // =========================================================================
25
26
    /**
27
     * @var array the database connections
28
     */
29
    public $connections = [];
30
31
    // Public Methods
32
    // =========================================================================
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function rules()
38
    {
39
        return [
40
            ['connections', ArrayValidator::class],
41
        ];
42
    }
43
}
44