Completed
Pull Request — master (#15)
by
unknown
03:18
created

DeliveryOption::getYmlBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace pastuhov\ymlcatalog\models;
3
4
/**
5
 * Class DeliveryOption
6
 * @package pastuhov\ymlcatalog\models
7
 */
8 View Code Duplication
class DeliveryOption extends BaseModel
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public static $tag = 'option';
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public static $tagProperties = [
19
        'cost',
20
        'days',
21
    ];
22
23
    public $cost;
24
    public $days;
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function rules()
30
    {
31
        return [
32
            [
33
                ['cost', 'days'],
34
                'required',
35
            ],
36
            [
37
                ['cost'],
38
                'integer',
39
            ],
40
            [
41
                ['days'],
42
                'string',
43
                'max' => 5,
44
            ],
45
        ];
46
    }
47
48
    /**
49
     * @inheritdoc
50
     */
51
    protected function getYmlBody()
52
    {
53
        return null;
54
    }
55
}
56