Completed
Pull Request — master (#6)
by
unknown
04:50
created

LocalDeliveryCost::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.6666
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
namespace pastuhov\ymlcatalog\models;
3
4
class LocalDeliveryCost extends BaseModel
5
{
6
    /**
7
     * @inheritdoc
8
     */
9
    public static $tag = 'local_delivery_cost';
10
11
    public $value;
12
13
    /**
14
     * @inheritdoc
15
     */
16
    public function rules()
17
    {
18
        return [
19
            [
20
                ['value'],
21
                'integer',
22
            ],
23
        ];
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    protected function getYmlBody()
30
    {
31
        return $this->value;
32
    }
33
}
34