Code Duplication    Length = 10-11 lines in 2 locations

common/models/MenuItem.php 1 location

@@ 45-54 (lines=10) @@
42
    /**
43
     * @inheritdoc
44
     */
45
    public function rules()
46
    {
47
        return [
48
            [['menu_id', 'label', 'url'], 'required'],
49
            [['menu_id', 'order', 'parent'], 'integer'],
50
            [['url', 'description', 'options'], 'string'],
51
            ['label', 'string', 'max' => 255],
52
            ['url', 'string', 'max' => 255],
53
        ];
54
    }
55
56
    /**
57
     * @inheritdoc

common/models/Term.php 1 location

@@ 60-70 (lines=11) @@
57
    /**
58
     * @inheritdoc
59
     */
60
    public function rules()
61
    {
62
        return [
63
            [['taxonomy_id', 'name'], 'required'],
64
            [['taxonomy_id', 'parent', 'count'], 'integer'],
65
            ['description', 'string'],
66
            [['name', 'slug'], 'string', 'max' => 200],
67
            ['name', 'unique'],
68
            ['slug', 'unique'],
69
        ];
70
    }
71
72
    /**
73
     * @inheritdoc