Code Duplication    Length = 8-9 lines in 2 locations

common/models/Option.php 1 location

@@ 39-46 (lines=8) @@
36
    /**
37
     * @inheritdoc
38
     */
39
    public function rules()
40
    {
41
        return [
42
            [['name', 'value'], 'required'],
43
            ['value', 'string'],
44
            [['name', 'label', 'group'], 'string', 'max' => 64],
45
        ];
46
    }
47
48
    /**
49
     * @inheritdoc

common/models/PostMeta.php 1 location

@@ 39-47 (lines=9) @@
36
    /**
37
     * @inheritdoc
38
     */
39
    public function rules()
40
    {
41
        return [
42
            [['post_id', 'name', 'value'], 'required'],
43
            ['post_id', 'integer'],
44
            ['value', 'string'],
45
            ['name', 'string', 'max' => 255],
46
        ];
47
    }
48
49
    /**
50
     * @inheritdoc