Settings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
1
<?php
2
/**
3
 * AssetPond plugin for Craft CMS 3.x
4
 *
5
 * Instant FilePond server that works with Craft Assets.
6
 *
7
 * @link      https://workingconcept.com
8
 * @copyright Copyright (c) 2019 Working Concept
9
 */
10
11
namespace workingconcept\assetpond\models;
12
13
use craft\base\Model;
14
15
/**
16
 * @author    Working Concept
17
 * @package   AssetPond
18
 * @since     1.0.0
19
 */
20
class Settings extends Model
21
{
22
    // Public Properties
23
    // =========================================================================
24
25
    /**
26
     * @var int
27
     */
28
    public $defaultVolumeId;
29
30
    /**
31
     * @var string POST field to check for base64-encoded FilePond files.
32
     */
33
    public $formUploadField = 'assetpond';
34
35
36
    // Public Methods
37
    // =========================================================================
38
39
    /**
40
     * @inheritdoc
41
     */
42
    public function rules(): array
43
    {
44
        return [
45
            ['formUploadField', 'string'],
46
            ['defaultVolumeId', 'number', 'integerOnly' => true],
47
            ['defaultVolumeId', 'required'],
48
        ];
49
    }
50
}
51