Code Duplication    Length = 10-10 lines in 5 locations

common/models/Media.php 1 location

@@ 68-77 (lines=10) @@
65
    /**
66
     * @inheritdoc
67
     */
68
    public function behaviors()
69
    {
70
        return [
71
            [
72
                'class' => SluggableBehavior::className(),
73
                'attribute' => 'title',
74
                'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['slug']],
75
            ],
76
        ];
77
    }
78
79
    /**
80
     * @inheritdoc

common/models/Post.php 1 location

@@ 69-78 (lines=10) @@
66
    /**
67
     * @inheritdoc
68
     */
69
    public function behaviors()
70
    {
71
        return [
72
            [
73
                'class' => SluggableBehavior::className(),
74
                'attribute' => 'title',
75
                'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['slug']],
76
            ],
77
        ];
78
    }
79
80
    /**
81
     * @inheritdoc

common/models/PostType.php 1 location

@@ 50-59 (lines=10) @@
47
    /**
48
     * @inheritdoc
49
     */
50
    public function behaviors()
51
    {
52
        return [
53
            [
54
                'class' => SluggableBehavior::className(),
55
                'attribute' => 'name',
56
                'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['slug']],
57
            ],
58
        ];
59
    }
60
61
    /**
62
     * @inheritdoc

common/models/Taxonomy.php 1 location

@@ 50-59 (lines=10) @@
47
    /**
48
     * @inheritdoc
49
     */
50
    public function behaviors()
51
    {
52
        return [
53
            [
54
                'class' => SluggableBehavior::className(),
55
                'attribute' => 'name',
56
                'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['slug']],
57
            ],
58
        ];
59
    }
60
61
    /**
62
     * @inheritdoc

common/models/Term.php 1 location

@@ 46-55 (lines=10) @@
43
    /**
44
     * @inheritdoc
45
     */
46
    public function behaviors()
47
    {
48
        return [
49
            [
50
                'class' => SluggableBehavior::className(),
51
                'attribute' => 'name',
52
                'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['slug']],
53
            ],
54
        ];
55
    }
56
57
    /**
58
     * @inheritdoc