DepositRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 7
cp 0
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hiqdev\yii2\merchant\models;
4
5
use yii\base\Model;
6
7
class DepositRequest extends Model
8
{
9
    /**
10
     * @var string
11
     */
12
    public $id;
13
14
    /**
15
     * @var string
16
     */
17
    public $amount;
18
19
    /**
20
     * @var string|null
21
     */
22
    public $currency;
23
24
    /**
25
     * @var string
26
     */
27
    public $merchant;
28
29
    /**
30
     * @var string
31
     */
32
    public $username;
33
34
    /**
35
     * @var string
36
     */
37
    public $returnUrl;
38
39
    /**
40
     * @var string
41
     */
42
    public $notifyUrl;
43
44
    /**
45
     * @var string
46
     */
47
    public $cancelUrl;
48
49
    /**
50
     * @var string
51
     */
52
    public $finishUrl;
53
54
    public function rules()
55
    {
56
        return [
57
            [['id', 'merchant', 'currency'], 'string'],
58
            [['amount'], 'number'],
59
            [['id', 'amount'], 'required'],
60
            [['merchant'], 'required'],
61
            [['finishUrl'], 'safe'],
62
        ];
63
    }
64
}
65